"Terje" <te***@cyberfactory.no> wrote in message news:<tS********************@news000.worldonline.d k>...
tanks....
"Evertjan." <ex**************@interxnl.net> skrev i melding
news:Xn********************@194.109.133.29... Terje wrote on 17 nov 2004 in comp.lang.javascript:
Title says all, if a user check checkbox1 chechbox3 will also be checked, how do I do this? Have searched around but kan only find out how to check the same box
<input type=checkbox
onclick="if(this.checked)
document.getElementById('cb3').checked=true">check box1<br>
<input type=checkbox id=cb3>checkbox3
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)
Title doesn't really 'say it all'...what happens when the user
un-checks checkbox3? Oh, well....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>untitled</title>
</head>
<body>
<form style="width:100px;">
<input type="checkbox" name="checkbox1" value="on"
onclick="checkbox3.checked=this.checked" /> checkbox1
<input type="checkbox" name="checkbox2" value="on" /> checkbox2
<input type="checkbox" name="checkbox3" value="on" /> checkbox3
</form>
</body>
</html>