firstly,
thanks ppl.
what i am looking for and want is.
i have a checkbox and a "hidden layer" beneath it.
so whenever someone checks the box, it should be visible.
this part is fine and works.
but when someone unchecks it, the layer should disappear.
how do you do this..
here is the code.
Quote:
this is the style denition
.message {visibility: hidden;}
here is the script..
function toggle(e) {
if (e.style.display == "none") {
e.style.display = "";
} else {
e.style.display = "none";
}
}
and here is the checkbox
<form>
<input type="checkbox" id="checkbox" onclick=toggle(message)" ></form>
here is the div..
<div id="message"> test the message script.</div>
|
what is happening is, this script overrides the style settings for the message div and displayes it.. when the checkbox is checked it disappears..
but what i want is the other way round.
when the checkbox is checked, it should appear..
how do i do it..???
Last edited by praveen; 12-19-2002 at 12:17 PM..
|