R
Rick
I have an html program with the following section of java script code:
var selected = false ;
for ( var i = 0; i <= 1 ; ++i ) {
if (form.yesno.status == true )
{ selected = true }
}
if ( selected == false ) {
alert ("Please indicate whether you have purchased from us before");
return false;
}
This portion of the html program validates a radio button on a form. It
essentially is supposed to return false if the user fails to check one of
the two button choices. The relevant portion of the form is here:
Have you purchased from us before?<br>
Yes
<input type="radio" name="yesno"
value="yes">
No
<input type="radio" name="yesno" value="no">
This code has worked fine for years, and it still works fine with IE.
However when you open the page in Netscape 7.1, it always returns "false",
regardless of what the user checks. Is there some error in the code that IE
is forgiving but that Nescape is picking up? Or is this a Netscape bug?
var selected = false ;
for ( var i = 0; i <= 1 ; ++i ) {
if (form.yesno.status == true )
{ selected = true }
}
if ( selected == false ) {
alert ("Please indicate whether you have purchased from us before");
return false;
}
This portion of the html program validates a radio button on a form. It
essentially is supposed to return false if the user fails to check one of
the two button choices. The relevant portion of the form is here:
Have you purchased from us before?<br>
Yes
<input type="radio" name="yesno"
value="yes">
No
<input type="radio" name="yesno" value="no">
This code has worked fine for years, and it still works fine with IE.
However when you open the page in Netscape 7.1, it always returns "false",
regardless of what the user checks. Is there some error in the code that IE
is forgiving but that Nescape is picking up? Or is this a Netscape bug?