Hi,
I hope someone can solve my problem:
I tried the following code to enable some checkboxes after I check one checkbox...
Unfortunately it doesn't work, and I can't figure out what the problem exactly is.
I hope someone can help me. Thanks anyways...
-----------------
I hope someone can solve my problem:
I tried the following code to enable some checkboxes after I check one checkbox...
Unfortunately it doesn't work, and I can't figure out what the problem exactly is.
I hope someone can help me. Thanks anyways...
-----------------
Code:
<html>
<head>
<script language='javascript'>
function markall(var)
{
f=document.forms[0];
for(i=0;i<f.elements.length;i++)
{
if(f.elements[i].id ==var)
f.elements[i].disabled = false;
}
}
</script>
</head>
<body>
<form name="myform" action="test4_x.php" method="post">
<b>menu</b><br>
<input type="checkbox" onclick="markall(abc)" name="def" value="1">main menu<br>
<input type="checkbox" id="abc" value="2" disabled>submenu 1<br>
<input type="checkbox" id="abc" value="3" disabled>submenu 2<br>
<input type="checkbox" id="abc" value="4" disabled>submenu 3<br>
<input type='submit' value='go'>
</form>
</body>
</html>