Ciao ho uno strano problema.
Io uso sempre il loadVars per inviare dati alla pagina asp e ricevere una risposta. Funziona correttamente, ma per un form di iscrizione non mi va ...
Allora, questo è l' AS
Mi restituisce Unknow error, cioe' non carica correttamente la pagina Asp, che esiste e prevede ogni sorta di errore, quindi non riesco a capire ...codice://***************************************funzione per login function ControllaRegister(){ with(_root.register_mc){ if (nome_txt.text == ""){ nome_txt.text = "Insert User!!" return; } if (password_txt.text == ""){ password_txt.text = "Insert Password!!" return; } if (mail_txt.text == ""){ mail_txt.text = "Insert a Valid Mail!!" return; }/* if(mail_txt.indexOf("@")>0 && mail_txt.indexOf("@") == mail_txt.lastIndexOf("@")){ if(mail_txt.lastIndexOf(".")>mail_txt.indexOf("@") && mail_txt.lastIndexOf(".")<mail_txt.length-1){ trace("a valid email"); } }else{ trace("email error"); return; }*/ } REGISTRA = true; Register() } function svuotaREG(){ with(_root.register_mc){ scritte_mc._visible = false; nome_txt._visible = false; password_txt._visible = false; mail_txt._visible = false; } } function Register(){ if (_root.REGISTRA = true){ svuotaREG() _root.REGIS = new LoadVars(); _root.ATTREG = _root.setInterval(_root.CheckReg, 50); _root.REGIS.onLoad = REGISTRATO; _root.REGIS.sendAndLoad("http://localhost/Simedia/Asp/REGISTRA.asp?NOME=" + _root.register_mc.nome_txt.text + "&PWD=" + _root.register_mc.password_txt.text + "&MAIL=" + _root.register_mc.mail_txt.text,"GET") } } function CheckReg(){ if(REGIS.getBytesLoaded() == 0){ return; _root.register_mc.risposta_txt.htmlText = "No Connection ..." } } function REGISTRATO(){ _root.clearInterval(_root.ATTREG) if(REGIS.loaded){ REGIS.RISPOSTA = _root.REGIS.RISPOSTA; _root.register_mc.risposta_txt.htmlText = REGIS.RISPOSTA; }else{ _root.register_mc.risposta_txt.htmlText = "Unknown Error ..."; } } _root.register_mc.register_btn.onPress = ControllaRegister;


Rispondi quotando
