I want to validate a form to make sure all field are entered before
submission and I understand javascript is best way to do this.
I have discovered how to do this for text input fields, but I need to
have validation on drop down list, so at the top of my list I can have
the option "select one" which is not able to be submitted.
This is the code I have that I thought would have made it work. Any
suggestions on what I have not done and what I could do to get it to
work.
Thanks
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide code from non-js browsers
function validateForm()
{
formObj = document.sample;
if ((formObj.place1text.value == "") ||
(formObj.place2text.value == "") ||
(formObj.day.value == ""))
{
alert("You have not filled in all the
fields.");
return false;
}
else
return true;
}
// end hiding -->
</SCRIPT>
Bookmarks