Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/07/2009, 21:16
Avatar de Rubil
Rubil
 
Fecha de Ingreso: octubre-2008
Mensajes: 23
Antigüedad: 15 años, 7 meses
Puntos: 0
De acuerdo Flash y Dreamweaver Formulario - Php

Hola a todos, algunas veces e dejado algunas preguntas espero tenga la generosidad de ayudarme con este pequeño problema por el cual no tengo visión:

//Hide processing MC
processing_mc.visible=false;--------------------------------------> es el proceso de carga
//----------------------------------------------lista de combobox
function addCountriesToList():void{
countryList.addItem({label:"United States"});
countryList.addItem({label:"Perú"});
countryList.addItem({label:"Mexico"});
countryList.addItem({label:"Brasil"});
countryList.addItem({label:"Japon"});
countryList.addItem({label:"China"});
countryList.addItem({label:"Canada"});
countryList.addItem({label:"España"});
countryList.addItem({label:"U.S.A"});
countryList.addItem({label:"Europeos"});
}
//Run fuction above now ----> corre funcion sobre ahora '???
addCountriesToList();

var variables:URLVariables = new URLVariables;

//Build the varSend Variable ----> Construir la Variable enviar Variable '???

var varSend:URLRequest = new URLRequest("contact.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;

//Build the varLoader variable
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE,complete Handler);

//handler for the php script completion and return of status
function completeHandler(event:Event):void{
//remove processing clip
processing_mc.visible = false;
name_txt.text="";
email_txt.text="";
msg_txt.text="";
kids.value=0;
checkBox.selected=false;

//Load the response from php here
status_txt.text = event.target.data.return_msg;
}

//add event listener for submit buttom click
submit_btn.addEventListener(MouseEvent.CLICK,Valid ateAndSend);

//Funcion ValidateAndSend
function ValidateAndSend(event:MouseEvent):void{

//validate fields
if(!name_txt.length){
status_txt.text= "Por favor escriba su nombre";
}else if(!email_txt.length){
status_txt.text= "Por favor escriba su email";
}else if(!msg_txt.length){
status_txt.text= "Por favor escriba su mensaje";
}else {

//All is good, send the data now to PHP
processing_mc.visible=true;

//ready else condition for error hending
variables.userName = name_txt.text;
variables.userEmail = email_txt.text;
variables.userMsg = msg_txt.text;
variables.userCountry = countryList.value;
variables.userKids = kids.value;
variables.userGender = radioGroup.value;
variables.userNewsletter = checkBox.selected;

//Send the data to php now
varLoader.load(varSend);

}//close else condition for error handing

}//close valider and send Funtion
lo e probado varias veces y esto no esta funcionando, me pregunto si tu habilidad me pueda aydar. Gracias.