A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Desperately seeking help!

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Location
    Barcelona
    Posts
    4

    Desperately seeking help!

    hello!

    i need your help! i have a form in my document which should check if the email-field has content, contains "@" and ".". but i just can't figure out how i check the "@" and the"."!!! please, i have to go online with this in a few days! I would be so greatful!!! THANK YOU!!!!

    sabine

    code:

    on (press) {
    validemail = "0";
    validnombre = "0";
    if (Number(length(email))>=1) {
    validemail = "10";
    } else {
    message = "Escribe tu email";
    }
    if (Number(length(nombre))>=1) {
    validnombre = "10";
    } else {
    message = "Escribe tu nombre";
    }
    }

    on (release) {
    if (Number(validnombre) == 10 and Number(validemail) == 10) {
    getURL("http://www.xxx/gracias.php","","POST");
    gotoAndPlay("cerrar");
    }
    }

  2. #2
    Really this is me..... mentaleruptions's Avatar
    Join Date
    Apr 2002
    Location
    WV, USA
    Posts
    1,114
    Check my signature for the mailform movie i submited here. It has form checking and checks for the @ in an email address....

    My Flashkit Submited Movies:
    Guestbook: V.1.0 V.1.2 V.1.3 V.1.4 PHP Mail Form: V.1.0
    My Deviantart page: Link

  3. #3
    Space Monkey daarboven's Avatar
    Join Date
    Sep 2001
    Location
    in the basement boiling soap...
    Posts
    217
    check for valid format of an email adress:
    (does not check if that email exists!!!)

    code:

    //check gültige mail

    mailcheck = adress.split("@");//split at the @ to see if theres somth. before and after the @
    if (mailcheck.length == 2 && mailcheck[1].length>4) {
    check2 = mailcheck[1].toString();//split second part to see if there are enough chars for domain name and domain
    tld = check2.split(".");
    if (tld[1].length>=2) {
    gotoAndPlay("view_score");
    } else {
    getURL("Javascript:alert('Enter valid mailto adress');");
    adress = "";
    delete (mailcheck);
    delete (check2);
    delete (tld);
    }


    :::i am jacks complete lack of surprise:::

  4. #4
    Junior Member
    Join Date
    Oct 2004
    Location
    Barcelona
    Posts
    4
    Thanks for your help. Both ways worked perfectly!!!

    ;D

    sabine

  5. #5
    Junior Member
    Join Date
    Oct 2004
    Location
    Barcelona
    Posts
    4

    Re: Desperately seeking help!

    Thanks for your help. Both ways worked perfectly! honestly, it was driving me crazy ;D

    sabine

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