function checkAll(field){
   for (i = 0; i < field.length; i++){
      field[i].checked = true;
   }
}

'length' is null or not an object
   Where is this being called from? Checkboxes don't have a "length"...

if u declare is like name="list37" doesnt PHP get that as an array even though it doesnt have the square brackets?
No, you need the square brackets to return an array of values. Otherwise you'll only get the first one.

--Daniel

Jay Blanchard wrote:
[el snipo]
For instance I have a small JavaScript sniplet that will check certain
checkboxes if a radio button is selected. Since I have a fair amount
of
checkboxes I want to put them in an array all their own so I use the
XHTML syntax w/brackets;

<input type="checkbox" name="list37[]" value="7" />

Suddenly JavaScript doesn't care for the object and throws an error
(take the brackets out and it works fine for JS, but PHP cannot see
all
of the values). I have Googled for this but think that my search
term(s)
are failing me because the condition is hard to describe.  Would
someone
please point me in the right direction?

Thanks!

        What kind of error does it throw? What function are you using to
access the object?
[/el snipo]

function checkAll(field){
   for (i = 0; i < field.length; i++){
      field[i].checked = true;
   }
}

'length' is null or not an object


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to