Comunidad de diseño web y desarrollo en internet online

guest boock

Citar            
MensajeEscrito el 30 Nov 2009 12:41 am
hola estuve viendo, un ejemplo de guest book, hecho en flash+php+mysql, pero tengo una duda, ¿puede usarce un boton creado para el submit y no el q trae(que es el componete button)?

Por carxfer

20 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 30 Nov 2009 04:56 am
Si, ya que solo se usa para ejecutar código puedes usar lo q tu quieras para invocar el método

saludos, Hernan . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

safari
Citar            
MensajeEscrito el 30 Nov 2009 12:20 pm
gracias por tu pronta respuesta, pero sigo con problemas, en el codigo as del button "submit" hay uin evento on(click) y al cambiarlo por un boton de mi creacion, ese evento no funciona

Por carxfer

20 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 30 Nov 2009 08:38 pm
Porque ese evento es exclusivo del botón submit, la traducción es:

Código ActionScript :

on(release){
}


Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 30 Nov 2009 10:51 pm
master no hay caso, mira, cambio el compononte button por un mc boton q hice yo
y le agrego esto.. antes estava con on click, te hice caso pero aun asi no me funciona

Código ActionScript :

on(release){
   /* 
   Modify these reference paths to yours if you
   have changed them. Also modify gb_status
   reference path if required
   */
   yourname = _parent._parent.write.yourname.text;
   youremail = _parent._parent.write.youremail.text;
   yourcomments = _parent._parent.write.yourcomments.text;
   
   // Check variable data
   if (yourname eq "") {
      _parent._parent.write.gb_status.text = "Required: Name";
   } else if (youremail eq "") {
      _parent._parent.write.gb_status.text = "Required: Email Address";
   } else if (!youremail.length || youremail.indexOf("@") == -1 || youremail.indexOf(".") == -1) {
      _parent._parent.write.gb_status.text = "Required: Valid Email Address";
   } else if (yourcomments eq "") {
      _parent._parent.write.gb_status.text = "Required: Comments";
   } else {
      _parent._parent.write.gb_status.text = "Please wait...";
      newEntry = new LoadVars()
      newEntry.ref = this
      newEntry.submit = "Yes" 
      newEntry.yourname = yourname
      newEntry.youremail = youremail 
      newEntry.yourcomments = yourcomments 
      newEntry.sendAndLoad("GuestBook.php?action=write&r="+random(999), newEntry, "POST") 
      newEntry.onLoad = function(success){ 
         if(success){ 
            _parent._parent.write.gb_status.text = this.gb_status;
            _parent._parent.read.loadEntries("Default", 10);
            // Clear fields
            _parent._parent.write.yourname.text = "";
            _parent._parent.write.youremail.text = "";
            _parent._parent.write.yourcomments.text = "";
         }
      } 
   }
}

Por carxfer

20 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 30 Nov 2009 11:10 pm
Imagino que debe ser algun problema con paths es en ese caso de llamadas :P

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.