View Single Post
Old 02-18-2007, 01:55 PM   #4 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,693
redhead is on a distinguished road
If you either decide solution 1 or 2 there will only be one checkAll function, I would most likely prefere the second solution, sicne you only need one single <form></form> surrounding all tabels within the page, and that would make it more vertile to query some form of server-side result processing..

So the layout would be something like this:
Code:
<script language...>
...
</script>
...
<form name=blah action=blah method=post>
<table ..>
<!-- first table -->
...
<input type=checkbox name=table1_apples>
<input type=checkbox name=table1_orranges>
...
<input type=checkbox name=allbox onclick="checkAll("table1");" value=on>
...
</table>
...
<table ..>
<!-- second table -->
...
<input type=checkbox name=table2_apples>
<input type=checkbox name=table2_orranges>
...
<input type=checkbox name=allbox onclick="checkAll("table2");" value=on>
...
</table>
...
<input type=submit value="My submit button">
</form>
...
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote