Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2003
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Required Fields and Correct Email Add.

    I think im gonna abuse my newbiness...

    Besides, Im kinda in a hurry to get this over with.. so i dont have much time or energy to "play" around with it anymore..so...

    Here's the thing I have two scripts one validates that all required fields - name, email, tel.nos..etc. are accomplished before it gets Submitted (via poprompt)...the other one, makes sure that the email address is correctly typed in..as with the @ sign and domain are in order...

    I've combined the two into one script (all fields are required), please see attached..but I can only make one work...how can i properly combine the two? Right now with the attached text script..it validates ONLY that Required fields are complete...
    I almost got it to work validating required fields and that a valid email is entered...but then...it only validated until the email add. w/o validating the rest of the fields, it accepted it when i hit submit

    The "perfect" sequence would be...first check that the Name field is filled up, and then check that a valid email address has been put in...(coz i dont want to have them put in a bogus email from the start..even if they've completed the other fields b4 submission...although, i could probably live with having them to go back and check the email field again....

    Attached Files Attached Files
    Thanks in advance for any replies! :)

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,919
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    The function checkemail() is not called anywhere so is not executed.

    <input type="text" name="requiredemail" size="25" MAXLENGTH="25" style="BACKGROUND-COLOR: rgb(0,0,0); COLOR: rgb(255,255,0); onBlur="checkemail(this)">

  • #3
    New Coder
    Join Date
    Feb 2003
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    uhmm..nope

    I think you're on to something there...but when I applied what you had suggested...didnt work.

    I think that function checkemail() is part of another javascript function...dunno what its called (im pretty darn new at this
    ...sub-function:confused: ...of this:

    <script>
    function checkbae(){
    if (document.layers||document.getElementById||document.all)
    return checkemail()
    else
    return true
    }
    </script>

    So i think there's a sequence that needs to be followed coz there are actually 3 "validating" scripts on this one...have to find the right combination and/or sequence...i think one is redundant...dunno...any more ideas?
    Thanks in advance for any replies! :)


  •  

    Posting Permissions

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