Killersites Community: check all checkbox - Killersites Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

check all checkbox

#1 User is offline   prajakta29 

  • View blog
  • Group: Member
  • Posts: 11
  • Joined: 08-December 11

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)
{
document.selectlist.elements[i].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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users