Hello to all the community,I’m really brand new….
Pls :
I have a form that post data to a php script by checkboxes.
Iwould like to introduce a button that check all the boxes,but…
1 <head>
2 //here the JS script works fine
3 <head>
4 <body>
5 <form method=”post” action=”myscript.php”>
6 <input type=”checkbox” name=”sendid[]” value=”Jim”>
7 <input type=”checkbox” name=”sendid[]” value=”John”>
8 <input type=”checkbox” name=”sendid[]” value=”Mary”>
9 <input type=button value=”Check All” onClick=”this.value=check(this.form.sendid[])”>
10 <input type=”submit” name=”send_data” value=”data”>
11 </form>
Now,the values of checkboxes have to be like
[B]sendid[][B]“check(this.form.sendid[])[B][]
Anyway,the JS script run well if I omit the [] but of course in this case the form is not going to pass an array to the PHP script.
Do anybody has idea about the way I can solve this problem??
Thank you very much.
Massimo