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 4 of 4

Thread: form validation

  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form validation

    Hi,

    Can someone help me?

    I am trying to validate a form. If something is entered wrongly and an alert box comes up, the user clicks OK but the form is
    reloaded. i.e all the stuff they have filled in is lost. How do I get so the form comes up again and the can just change the mistake and everything else is still there.

    Thanks

    K

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help is at hand

    Have you a url for the form? Failing that, change the value of the submit button from Send if it is set at that and set it to call the function that validates the form.

    I hope this helped.
    Therapy is expensive, popping bubble wrap is cheap, you choose.

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Wrong forum - I'll move this to Javascript Programming.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Are you doing:

    <form.....onsubmit="return validator()">

    ...or:

    <input type="submit" onclick="return validator()">

    Both are necessary; don't omit the 'return'....


  •  

    Posting Permissions

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