Salve a tutti,
so di esser un neofita abbastanza grave... non riesco a capire come devo formulare la formula if e se i campi sono vuoti o errati non deve inviare la mail... invece la ricevo ugualmente ma vuota! help please!
codice:stop(); pulsInvio.onRelease = function(){ var sendMail:LoadVars = new LoadVars(); sendMail.nome = Nome.text; if ((Nome.text == null || Nome.text == "" || Nome.length < 3) or (Nome.text == "campo obbligatorio")) { Nome.text = "campo obbligatorio"; }; sendMail.cognome = Cognome.text; if ((Cognome.text == null || Cognome.text == "" || Cognome.length < 3) or (Cognome.text == "campo obbligatorio")) { Cognome.text = "campo obbligatorio"; }; sendMail.mittente = Email.text; if ((Email.text == null || Email.text == "" || Email.length < 3) or (Email.text == "campo obbligatorio")) { Email.text = "campo obbligatorio"; }; sendMail.richiesta = Richiesta.text; if ((Richiesta.text == null || Richiesta.text == "" || Richiesta.length < 3) or (Richiesta.text == "campo obbligatorio")) { Richiesta.text = "campo obbligatorio"; }; sendMail.destinatario = 'xxxxx@xxxxx; sendMail.onLoad = function(success){ if(success){ Nome.text = ''; Cognome.text = ''; Email.text = ''; Richiesta.text = ''; mcMsg.mcTxt.txtMsg.text = this.controllo; mcMsg.play(); gotoAndPlay(3) } } sendMail.sendAndLoad('http://xxxxxxxxxxxxx/email.php', sendMail, 'POST'); }

Rispondi quotando