I use JS to validate a form. Everything works just fine in IE or even Netscape 6.2. The problem occurs with Netscape 4.79 and with a pop-up menu only:
There is a pop-up menu where users are asked to select a gender (don't mind the [FMP] tags, they are used to populate the menu):
<select name="Sex" value="">
<option value="">-Select One-
[FMP-valuelist:Sex,list=Sex]
<option value="[FMP-valuelistitem]">[FMP-valuelistitem]
[/FMP-valuelist]
</select>
I use the following JS to verify that the field is not empty:
if (isEmpty(document.theForm.Sex.value))
return WarnEmpty(document.theForm.Sex, "Sex"
;
function isEmpty (s)
{
var re = /\S/;
return ((s==null) || (s.length==0) || (re.test(s) == 0))
}
For some reason, no matter what I do, this function returns true (the field is empty) (in Netscape 4.79 only).
Any Idea on why ?
but more importantly:
How to make Netscape 4.79 validate the field properly ?
Thanks
There is a pop-up menu where users are asked to select a gender (don't mind the [FMP] tags, they are used to populate the menu):
<select name="Sex" value="">
<option value="">-Select One-
[FMP-valuelist:Sex,list=Sex]
<option value="[FMP-valuelistitem]">[FMP-valuelistitem]
[/FMP-valuelist]
</select>
I use the following JS to verify that the field is not empty:
if (isEmpty(document.theForm.Sex.value))
return WarnEmpty(document.theForm.Sex, "Sex"
function isEmpty (s)
{
var re = /\S/;
return ((s==null) || (s.length==0) || (re.test(s) == 0))
}
For some reason, no matter what I do, this function returns true (the field is empty) (in Netscape 4.79 only).
Any Idea on why ?
but more importantly:
How to make Netscape 4.79 validate the field properly ?
Thanks