[thelist] Radio Button Value Property Does Not Exist in Netscape 6.1?

gregory.john.toland at census.gov gregory.john.toland at census.gov
Mon Oct 29 08:08:27 CST 2001

I have the following code:

<form enctype="text/plain" id="myForm" method="get"
      name="myForm" onSubmit="return true;">
   <input checked id="txtStep1" name="txtStep1"
          title="Tabular Profile" type="radio"
   <input id="txtStep1" name="txtStep1"
          title="Narrative Profile" type="radio"

In Netscape 4.X and IE 5.X the code:

   alert( document.MyForm.txtStep1[01].value );

returns "Narrative"

In Netscape 6.1 the same code gives an error message in the Javascript

   "Error: document.myForm.txtStep1[1] has no properties."

Did something change?

In Netscape 6.1 if I use:

   alert( document.MyForm.txtStep1.value );

I get the correct answer, "Tabular".  I cannot use this code in IE 5.X
and NN 4.X, however.  It gives a result of "undefined".  Must we have
different code for the two sets of browsers for accessing such basic
properties of form elements?  Is there any documentation out there that
talks about this?  According to
http://developer.netscape.com/docs/manuals/js/client/jsref/radio.htm the
last example shows my code should work under JS 1.3/NN 6.1.  Any ideas?

Greg Toland

More information about the thelist mailing list