prajakta29 Posted January 12, 2012 Report Share Posted January 12, 2012 hello everybody... facing a simple problem.what is the format to make all check-boxes check in particular category.. i have 3-4 categories in my code.n i have created a function check all which will select all check-boxes.bt the problem is that i want to create three separate functions for each category which can select only check boxes belonging to that category... what is the format in js.. here is part of my code // function check all which select all checkboxes function chkall() { for(i=0; i<document.selectlist.elements.length; i++) { if (document.selectlist.elements.checked==false) { document.selectlist.elements.checked=true; } } //php n html coding <form name="selectlist" action="calledlistpg.php?requestid=<? echo $requestid?>&clientid=<? echo $clientid ?>&page=<? echo $page ?>" method="post"> echo"<td><input type='checkbox' name='chkselectmodel[]' value='$regid'></td>"; echo "<td><input type='checkbox' name='chkselectmodelpics[]' value='$regid'></td>"; echo "<td><input type='checkbox' name='chkselectmodelmsg[]' value='$regid'></td>"; echo "<td><input type='checkbox' name='chkselectmodelng[]' value='$regid'></td>"; //cz of checkall function all checkboxes are getting selected...i want to create 3 more functions like checkall which will individualy select chkselectmodelpics[],chkselectmodelmsg[],chkselectmodelng[] I hope u got my prb...any help is appreciable...thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.