12-30-2008, 04:01 AM
|
#2 (permalink)
|
|
The Contributor
Join Date: Apr 2008
Posts: 78
Thanks: 0
|
I was finally able to figure this one out and thought I would post the result here in case others need such a solution. The argument is the name of the main checkbox.
HTML Code:
function ChangeClickedStatus(boxname)
{
var ison = document.getElementsByName(boxname)[0].checked;
var elm = document.getElementsByTagName("input");
for (j = 0; j < elm.length; j++)
{
if (elm[j].type == 'checkbox')
{
if (elm[j].name.search(boxname + "_") == 0)
{
if (ison == true)
elm[j].checked = true;
else
elm[j].checked = false;
}
}
}
}
|
|
|
|