Netscape hidden fields - array - multiple fields with same name

M

mark.reichman

First off.. Thanks to Grant Wagner for help in a previous thread
related to this one.

I am at a total loss... I have multiple fields in a form with the
same name. Lets call the fields with the same name "junk_array". My
first field of junk_array is a input type=hidden. All the others
fields in junk_array that follow are type=text. I can reference this
first hidden field in IE with document.form.field[0].value. In, fact
my form works absolutely wonderful in IE 6. However, netscape 4.7
does not recognize my first field in the array as the hidden field.
Netscape sees the first visible text field as the first field in the
array, subscript 0. What totally and utterly perplexes me, is that,
from a previous thread, I can do this and get 9999 back in an alert
box in Netscape and IE. So, this proves Netscape doesn't have some
evil code that disregards hidden fields. I guess...

<body onload="alert(document.myForm.test[0].value);">
<form name="myForm">
<input type="hidden" name="test" value="9999">
<input type="hidden" name="test" value="8888">
<input type="text" name="test" value="6">
<input type="text" name="test" value="3">
</form>

I even copied these fields directly below the opening <form> tag in my
form and both Netscape and IE see the first hidden field as as
subscript 0.

However, my form is much more complicated. I have tables within
tables and about 30 other fields. In my form I cannot for the life of
me get Netscape to recognize the first hidden field of junk_array to
zed as index 0.
Somehow, If I make the first type=hidden fields visible, netscape does
work nicely. Why when I toggle type=hidden to type=text does Netscape
cooperate. What is happening here? Anyone else have this problem with
hidden fields in Netscape? I could post the code to my form but it is
big.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top