The code shown below displays a table in a form with 3 check boxes.
When the left checkbox is selected, all other checkboxes are also
selected (hotmail style) (thanks for the groups help with this). The
onUnCick event doesn't work. Could anyone tell me how to correct it??
Thanks,
Ed
<html>
<head>
<title></title>
</head>
<body>
<form name=taskform action=test.php method=post>
<script language="JavaS cript">
<!--
var row_1 = new Array("Monday0" , "Monday1")
function check_boxes1(st ate)
{
for (y=0; y < row_1.length; y++)
{
for (i = 0; i < document.taskfo rm.elements.len gth; i++)
{
if (document.taskf orm.elements[i].name == row_1[y])
document.taskfo rm.elements[i].checked = state;
}
}
}
--> </script>
<table border=1 width=85%>
<tr>
<td class=small>Che ck increment</td>
<td class=small>tog gle</td>
<td class=small>0:0 0</td><td class=small>1:0 0</td>
</tr>
<tr>
<td class=small>on the hour</td>
<td><input type=checkbox name=checkall_r ow1
onClick="check_ boxes1(true)" onUnClick="chec k_boxes1(false) "></td>
<td><input type=checkbox name=Monday0></td>
<td><input type=checkbox name=Monday1></td>
</tr>
</table>
</form>
</body>
</html>
When the left checkbox is selected, all other checkboxes are also
selected (hotmail style) (thanks for the groups help with this). The
onUnCick event doesn't work. Could anyone tell me how to correct it??
Thanks,
Ed
<html>
<head>
<title></title>
</head>
<body>
<form name=taskform action=test.php method=post>
<script language="JavaS cript">
<!--
var row_1 = new Array("Monday0" , "Monday1")
function check_boxes1(st ate)
{
for (y=0; y < row_1.length; y++)
{
for (i = 0; i < document.taskfo rm.elements.len gth; i++)
{
if (document.taskf orm.elements[i].name == row_1[y])
document.taskfo rm.elements[i].checked = state;
}
}
}
--> </script>
<table border=1 width=85%>
<tr>
<td class=small>Che ck increment</td>
<td class=small>tog gle</td>
<td class=small>0:0 0</td><td class=small>1:0 0</td>
</tr>
<tr>
<td class=small>on the hour</td>
<td><input type=checkbox name=checkall_r ow1
onClick="check_ boxes1(true)" onUnClick="chec k_boxes1(false) "></td>
<td><input type=checkbox name=Monday0></td>
<td><input type=checkbox name=Monday1></td>
</tr>
</table>
</form>
</body>
</html>
Comment