Netscape hidden fields - array - multiple fields with same name

Discussion in 'Javascript' started by mark.reichman@rl.af.mil, Jul 17, 2003.

  1. Guest

    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.
    , Jul 17, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick
    Replies:
    3
    Views:
    8,098
    Alexey Smirnov
    Apr 13, 2010
  2. Fred
    Replies:
    4
    Views:
    529
  3. Replies:
    1
    Views:
    79
    Grant Wagner
    Jul 16, 2003
  4. lawrence
    Replies:
    3
    Views:
    183
  5. SolarCanine
    Replies:
    2
    Views:
    253
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page