Foros del Web » Creando para Internet » Flash y Actionscript »

problema con checkbox en formulario

Estas en el tema de problema con checkbox en formulario en el foro de Flash y Actionscript en Foros del Web. Hola denuevo. He tenido q cambiar algunos de los datos de un formulario hecho en flash por combobox y checkbox. El combobox he conseguido que ...
  #1 (permalink)  
Antiguo 31/08/2010, 19:36
 
Fecha de Ingreso: marzo-2010
Mensajes: 61
Antigüedad: 14 años, 1 mes
Puntos: 1
problema con checkbox en formulario

Hola denuevo. He tenido q cambiar algunos de los datos de un formulario hecho en flash por combobox y checkbox. El combobox he conseguido que funcione y envia los datos perfectamente pero el checkbox me manda como dato "undefined "
los checkbox se llaman check1, check2...
Adjunto codigo del flash:

function buscaSeleccionados():Array {

var tipo = new Array();

for(var i = 1; i <2; i++) {

if(this["check" + i].selected) {

tipo.push(this["check" + i].label);

}

}

return tipo;

}







enviar = function () {
if (ragione.text.length !=0 && forma.length !=0 && comune.length !=0 && provincia.length !=0 && attivita.text.length !=0 && fatturato.length !=0 && servizio.length !=0 && importo.length !=0 && tipo.text.length !=0 && nome.length !=0 && telefono.length !=0 && mail.length !=0 && note.length !=0) {
if (mail.text.indexOf("@") != -1 && mail.text.indexOf(".") != -1) {
function() {

// Creamos el arreglo respuestas con el arreglo que nos regresa la función buscaSeleccionados

var tipo:Array = buscaSeleccionados();

}
form1 = new LoadVars();
form1.ragione = ragione.text;
form1.forma = forma.text;
form1.comune = comune.text;
form1.provincia = provincia.text;
form1.attivita = attivita.text;
form1.fatturato = fatturato.text;
form1.servizio = servizio.text;
form1.importo = importo.text;
form1.tipo = tipo.text;
form1.nome = nome.text;
form1.telefono = telefono.text;
form1.mail = mail.text;
form1.note = note.text;
form1.sendAndLoad("send.php", form1, "POST");
servidor_txt.text = "Stiamo inviando il tuo messaggio..";
ragione.text = "";
forma.text = "";
comune.text = "";
provincia.text = "";
attivita.text = "";
fatturato.text = "";
servizio.text = "";
importo.text = "";
tipo.text = "";
nome.text = "";
telefono.text = "";
mail.text = "";
note.text = "";
form1.onLoad = function() {
if (this.estatus == "ok") {
servidor_txt.text = "Il tuo messaggio è stato inviato.";
ragione.text = "";
forma.text = "";
comune.text = "";
provincia.text = "";
attivita.text = "";
fatturato.text = "";
servizio.text = "";
importo.text = "";
tipo.text = "";
nome.text = "";
telefono.text = "";
mail.text = "";
note.text = "";
} else {
servidor_txt.text = "Ci sono problemi con il server.";
}
};
} else {
email_txt.text = "Posta elettronica non valida";
}
} else {
ragione.text = "Dato richiesto";
forma.text = "Dato richiesto";
comune.text = "Dato richiesto";
provincia.text = "Dato richiesto";
attivita.text = "Dato richiesto";
fatturato.text = "Dato richiesto";
servizio.text = "Dato richiesto";
importo.text = "Dato richiesto";
tipo.text = "Dato richiesto";
nome.text = "Dato richiesto";
telefono.text = "Dato richiesto";
mail.text = "Dato richiesto";
note.text = "Dato richiesto";
}
};

enviar_btn.onRelease = enviar;


lo envia perfectamente todo pero el valor de la variable tipo q es la q se supone q contiene los checkbox me sale "undefined"


agradezco vuestra ayuda
  #2 (permalink)  
Antiguo 01/09/2010, 04:39
Avatar de Lynxcraft  
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 16 años, 5 meses
Puntos: 51
Respuesta: problema con checkbox en formulario

por que a tipo lo envías como txt si es un array ??

form1.fatturato = fatturato.text;
form1.servizio = servizio.text;
form1.importo = importo.text;
form1.tipo = tipo.text;
form1.nome = nome.text;
form1.telefono = telefono.text;
form1.mail = mail.text;
__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft

Etiquetas: checkbox, formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:43.