Hi
I am using a really simple javascript validation script to validate 1 drop down field on a form. The fields have simple values 0, 1, 2, and 3. With value “0” the form shouldn’t submit.
The popup displays the message fine. When I click “OK”, the box dissapears and the form is submitted anyway, without letting me select a different value from my drop down list.
Am I missing something really daft here?
Many thanks
MrM
<SCRIPT LANGUAGE="JavaScript">
<!--
function validateForm(objForm)
{
var returnStatus = 1;
if (objForm.size.selectedIndex == 0) {
alert("Oops! Please select a size...");
returnStatus = 0;
};
if (returnStatus = 1) {
objForm.submit();
}
}
// -->
</SCRIPT>