If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Help with my Form Valadation Please

Hi, I'm new to JavaScript and while doing college work i have to create a form with validation, so far the Validation works but when click on the Submit key after all the correct information has been inputted the form does not go to *Untitled-2.html* and i can't seem to find out why please help me. I hope its not a completely silly reason why its not working but the help will be very much appreciated

Little Confused

I think i got a little confused in your answer, that code is copy - paste from the Original code, and what I'm hoping for the code to do is after the validation's have been made, and are all filled in, to redirect to *Untitled-2.html* but this wont happen, Hope this Clarifies your question.

Some advice, if I may. Don't use an individual alert for each and every incorrect entry. Set a variable called warn to "", and for each incorrect entry:

Code:

warn += "New message for correcting.\n";

Then at the end of the function, if warn == "", return true, else alert(warn) and return false.

Also, at the end of the function you currently have return true spelled as return ture, and it immediately follows the return false with no closing } between them.

Another thing - web documents should not have spaces in the name.
<link href="Main Sheet.css" rel="stylesheet" type="text/css" />
Change the filename to Main_Sheet.css, or Main-Sheet.css, or MainSheet.css, and then correct the href accordingly.

|||||o . Q
_—__ "You live and you learn; or you don't live long." - Lazarus Long

Thank You!

Thank you both for the hlpe i didn't fully understand why not to use an Alert for each one, but im still new to this so im ok with that, after looking very closely to the {} i saw that like you said the *return ture* was not seperated by {}, after placing this in the code works fine now and when all the information has been placed in goes to the next page