[PHP] how to acess php array var in Js?

2001-11-27 Thread Christian Dechery

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
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] how to acess php array var in Js?

2001-11-27 Thread Martin Towell

try : form_name[cb[]]

-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 11:53 AM
To: [EMAIL PROTECTED]
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
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]