Hello, I would like to show or hide a div if a checkbox is on or off.
I found the some code that worked perfectly in FF but in IE it makes all the content of the page disappear but the checkbox.
Here is the code im using, inside the head tag...
<script>
<!--
function c(){}
function test(){
if(document["form"]["box"].checked){
document.getElementById("myText").style.visibility="visible"}
else{
document.getElementById("myText").style.visibility="hidden"}
}
//-->
</script>
and here is the rest of the code...
<form name="form">
<label for="condiciones"><a href="#">Condiciones</a>
<input type="checkbox" name="box" checked="checked"
onclick ="c();test()" /></label>
</form>
<div id="myText"><img src="img.png" /></a></div>
I would love some help with this, I also tried similar ones with the same result.
Thanks a lot, Marcelo.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic