Javascript help needed.
Date: 03/01/05
(Web Development) Keywords: java
I am working on an online estimate form for my job. You can see it here:
MGS Estimate Form
I have almost everything working except a few Javascript things that I can't get worked out. Code that seems to me should be working but for some reason isn't. They are commented in the file but the problems I am having are:
1) The email field will not reset focus to itself after I reset it's value to blank (ie "") to make the user re-enter a valid email address.
2) The date checking code that is run on the OnSubmit of the form doesn't stop the form from submitting if it fails validation. I tried adding return break; in the code and that didn't work. It actually stopped the validation code from working.
3) The file upload fields will not reset their values to blank (ie "") after the validation code finds that the file the person is trying to upload is of an invalid type.
All the script code is at the top of the file. Any help or suggestions would be appreciated before I pull my hair out.
Source: http://www.livejournal.com/community/webdev/176589.html
|