Jump to content


check all checkbox

  • Please log in to reply
No replies to this topic

#1 prajakta29


    New member

  • Member
  • 11 posts

Posted 12 January 2012 - 01:46 AM

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[i].checked==false)

//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
  • 0

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

★★★★★ 5 Star Rated Web Developer Course - check it out now!