A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: making valiadation using javascript in flash form

  1. #1
    Senior Member
    Join Date
    May 2001
    Posts
    485

    making valiadation using javascript in flash form - mx2004

    hello,

    I have a flash form which I have used for years, i check for proper email and if named is filled, now I am trying to do a phone number validation... I am getting errors, this is my code...

    it is the var Pattern which is casing the error


    var pattern=[A-X,a-z];
    on (release) {
    if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
    EmailStatus = "Please enter a valid E-mail address";
    }
    else if (!name.length) {
    EmailStatus = "Please enter your name";
    }

    else if (pattern.test(phone.value)){
    EmailStatus = "Please enter a valid phone number";
    }

    else {
    loadVariablesNum("sendmail.asp", 0, "POST");
    gotoAndPlay(2);
    }
    }
    Last edited by jbalyney; 09-19-2006 at 09:20 AM.

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    485
    bump! no one has any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center