check all checkbox

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

echo"

";
echo “”;
echo “”;
echo “”;

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

Sponsor our Newsletter | Privacy Policy | Terms of Service