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

    Join Date
    Aug 1999
    Posts
    119
    Rep Power
    15

    arrays, forms, and javascript


    I've seen in the documentation that if you name a select box (for instance) as "myselect[]", PHP will read the values in the select box as elements of the myselect array.

    When I do that, I run into issues with Javascripts. Is there anyway to avoid this?
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,938
    Rep Power
    4033
    if you want to refer to the form element via javascript you will probably have to use something like the following.

    document.formName['myselect[]'].property

    I havn't tried this but i think it should work.

IMN logo majestic logo threadwatch logo seochat tools logo