I'm using a validation code that changes an image when the form fails to pass validation. One of my form elements is drop down box with an initial value of "Please Select". I want the box to fail validation when its value is left as "Please Select". The code for the function is:
function validateForm() {
haveerrors = 0;
(document.form1.slsStore.value=="Please Select")
? showImage("storeerror", "/images/storenumber.gif", true)
: showImage("storeerror", "/images/blankimage.gif", false);
return (!haveerrors);
}
...what is the proper syntax for "document.form1.slsStore..."
function validateForm() {
haveerrors = 0;
(document.form1.slsStore.value=="Please Select")
? showImage("storeerror", "/images/storenumber.gif", true)
: showImage("storeerror", "/images/blankimage.gif", false);
return (!haveerrors);
}
...what is the proper syntax for "document.form1.slsStore..."
Comment