try : form_name["cb[]"]

-----Original Message-----
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 11:53 AM
Subject: [PHP] how to acess php array var in Js?

If I have a series of checkboxes like this:

<input type=checkbox name="cb[]" value="1"> This is 1
<input type=checkbox name="cb[]" value="2"> This is 2
<input type=checkbox name="cb[]" value="3"> This is 3
<input type=checkbox name="cb[]" value="4"> This is 4

how can I acess "cb[]" in Javascript other than using the "elements" array??

I can't do cb[][0].checked for example... it gives me parse error...
using the elements array is not that nice codewise...

any hints?

. Christian Dechery
. . Gaita-L Owner / Web Developer
. .
. .

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to