A lot of this will depend on the server-side. If you're using PHP,
it's a matter of naming the form elements correctly. There are two
methods I'm aware of, probably more.
<input type="checkbox" name="foo[1]" value="1" />
<input type="checkbox" name="foo[2]" value="1" />
<input type="checkbox" name="foo[3]" value="1" />
<input type="checkbox" name="foo[4]" value="1" />
This will return an array named foo containing all of the checked
elements:
$_POST['foo'] = Array (
1 => 1,
3 => 1,
4 => 1
)
<input type="checkbox" name="foo_1" value="1" />
<input type="checkbox" name="foo_2" value="1" />
<input type="checkbox" name="foo_3" value="1" />
<input type="checkbox" name="foo_4" value="1" />
This will return a separate variable for each checked element:
$_POST['foo_1'] = 1
$_POST['foo_3'] = 1
$_POST['foo_4'] = 1
HTH,
Walter
On Mar 31, 2009, at 2:17 PM, xGuy wrote:
>
> I do not know how receive and send my checkbox values array.
> How can do this by POST or GET method ..
> Hugss xGuy
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---