field VALIDATION problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • theodore
    Sergeant

    • Sep 2006
    • 29

    field VALIDATION problem

    hi i need your help to the following:

    i have add the following script to my form for field validation.
    and i have the following problem:
    the message apeared but if you click OK to return to the form directs to the thankyou page.
    try the form to see what i mean

    Form: http://www.flyeuroair.net/contactform.php

    script
    --------------------------------------------------------------
    <SCRIPT>
    function validate() {
    if(document.contact.Name.value=='' || document.contact.Phone.value=='' || document.contact.email.value==''){
    alert('Please submit all the required informations befor continue')
    } else {
    document.contact.submit()
    }
    }
    </SCRIPT>
    -------------------------------------------------------------
    onClick='validate()'>

    -------------------------------------------------------------

    Can someome help me???

    Thanks
  • theodore
    Sergeant

    • Sep 2006
    • 29

    #2
    Re: field VALIDATION problem

    O.K.

    I found the problem was that i didnt put the "onsubmit" code into the form tags. Now it works

    thanks

    Comment

    Working...
    X