Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / June 2007



Tip: Looking for answers? Try searching our database.

InputText fields having free will

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Donke - 25 Jun 2007 20:25 GMT
i'm designing an email form FLASH<->ASP...

in it there is an actiionscript that validates the data on the form...(code
attached)
if it's ok, send it through email, if there's an error, goes to another frame,
that has a pop-up warning what and where is the error...

But the problem is... Sometimes i just can't edit the textboxes... Or i can
type 2 or 3 letters and than no more... only if i type it form the middle of
the text...

Any idea of what's foing on???

on (press) {

function ConferirDados() {
    if (form.nome.length == 0) {
        gotoAndStop(57);
        dynCampo.text = "Campo: Nome";
        dynDesc.text  = "Descrição de erro: Campo vazio. Coloque seu nome.";
        return false;
    }
   
    if (form.email.length == 0) {
        gotoAndStop(57);
        dynCampo.text = "Campo: E-Mail";
        dynDesc.text  = "Descrição de erro: Campo vazio. Coloque seu e-mail.";
        return false;
    }

    var sEMail:String = form.email.text
    if (sEMail.indexOf("@") == -1) {
        gotoAndStop(57);
        dynCampo.text = "Campo: E-Mail";
        dynDesc.text  = "Descrição de erro: E-Mail inválido.";
        return false;
    }
   
    if (form.ddd.length < 2) {
        gotoAndStop(57);
        dynCampo.text = "Campo: Telefone - DDD";
        if (form.ddd.length == 0) {
              dynDesc.text  = "Descrição de erro: DDD vazio.";
        } else  {
              dynDesc.text  = "Descrição de erro: DDD inválido.";
        }
        return false;
    }

    if (form.tel.length < 7 ) {
        gotoAndStop(57);
        dynCampo.text = "Campo: Telefone - Número";
        if (form.tel.length == 0) {
              dynDesc.text  = "Descrição de erro: Telefone vazio.";
        } else  {
              dynDesc.text  = "Descrição de erro: Telefone inválido.";
        }
        return false;
    }
   
    if (form.assunto.length == 0) {
        gotoAndStop(57);
        dynCampo.text = "Campo: Assunto";
        dynDesc.text  = "Descrição de erro: Campo vazio. Coloque um anúncio.";
        return false;
    }

    if (form.msgm.length == 0) {
        gotoAndStop(57);
        dynCampo.text = "Campo: Mensagem";
        dynDesc.text  = "Descrição de erro: Campo vazio. Digite uma mensagem.";
        return false;
    }

return true;
}

dadosOK = ConferirDados()
if (dadosOK == true) {
   form.loadVariables ("email.asp", "", "POST");
} else {
   gotoAndStop(52)
 
}

 
}
MotionMaker - 26 Jun 2007 02:07 GMT
1. This code is getting dated. Looks like vintage Flash 5.

2. The answer to your question is in the code and the data you are typing. You
have not provided the characters you are typing, but they are probably being
flagged by the code. Provide that and perhaps you can get more help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.