#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    29
    Rep Power
    0

    naming a form-element in javascript


    I've got a form named "dataform".
    The elements, within the form, are named like "data[textfield_Nr1]", since I want to post one array containing the form data.

    This WORKS :
    document.dataform.elements["data[textfield_Nr1]"].value

    This DOESN'T:
    document.dataform.elements["data[radiobutton[1]]"].checked = true;
    (before deciding for one array "data", this worked well: document.dataform.radiobutton[1].checked = true;)

    Also, the dropdown I use, became disfunctional after the switch.
    How to get this working?
  2. #2
  3. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    Could you post the HTML involved? That's where the objects (and their identifiers) come from. tia

IMN logo majestic logo threadwatch logo seochat tools logo