E
Eric
Hi all,
I have a form that generates a dynamic number of rows from a value
passed in via querystring. I have a one static row in my form with a
"master" checkbox that I have deemed "Select All:". I want to be able
to select all and deselect all the other checkboxes beneath it in the
column by clicking on it. I've gotten it partially working. I can
click the "master" checkbox and it will set the .checked property of
all the others to true. BUT how do I reverse the process and turn them
all off? Here is my funcion:
function selectAllInstall()
{
var frm;
frm = document.frm;
if (frm.chkCheckAllInstall.checked = true)
{
for (var i = 0; i < <%=dtlQty%>; i++)
{
frm.chkInstallReq.checked = true;
}
}
if (frm.chkCheckAllInstall.checked = false)
{
for (var i = 0; i < <%=dtlQty%>; i++)
{
frm.chkInstallReq.checked = false;
}
}
}
HTML for the Main Checkbox:
<td class="mnuHdr"><input type="checkbox" name="chkCheckAllInstall"
onClick="selectAllInstall();"></td>
Any ideas or suggestions would be greatly appreciated.
Thanks.
I have a form that generates a dynamic number of rows from a value
passed in via querystring. I have a one static row in my form with a
"master" checkbox that I have deemed "Select All:". I want to be able
to select all and deselect all the other checkboxes beneath it in the
column by clicking on it. I've gotten it partially working. I can
click the "master" checkbox and it will set the .checked property of
all the others to true. BUT how do I reverse the process and turn them
all off? Here is my funcion:
function selectAllInstall()
{
var frm;
frm = document.frm;
if (frm.chkCheckAllInstall.checked = true)
{
for (var i = 0; i < <%=dtlQty%>; i++)
{
frm.chkInstallReq.checked = true;
}
}
if (frm.chkCheckAllInstall.checked = false)
{
for (var i = 0; i < <%=dtlQty%>; i++)
{
frm.chkInstallReq.checked = false;
}
}
}
HTML for the Main Checkbox:
<td class="mnuHdr"><input type="checkbox" name="chkCheckAllInstall"
onClick="selectAllInstall();"></td>
Any ideas or suggestions would be greatly appreciated.
Thanks.