I was wondering if someone could tell me what i'm doing wrong here. Real simple code, but it doesn't work.
BTW, I really only care for this to work with IE 6+
<script type=text/javascript>
<!--
// Show/Hide function
function showMe(id) { // This gets executed when the user clicks on the checkbox
document.poppedLayer = eval('document.all[\'id\']'); // This evaluates whether the checkbox is checked or not
if (document.poppedLayer) { // if it is checked, make it visible, if not, hide it
document.poppedLayer.style.visibility = "visible";
} else {
document.poppedLayer.style.visibility = "hidden";
}
}
//-->
</SCRIPT>
<div id="div1">
<h3 align="center"> This JavaScript shows how to hide divisions </h3>
<table border=1 id="t1">
<tr>
<td>i am here!</td>
</tr>
</table>
</div>
<input type="checkbox" name="c1" onclick=showMe(div1) value=http://www.webdeveloper.com/forum/archive/index.php/"Show Active">Show Hide Checkbox
BTW, I really only care for this to work with IE 6+
<script type=text/javascript>
<!--
// Show/Hide function
function showMe(id) { // This gets executed when the user clicks on the checkbox
document.poppedLayer = eval('document.all[\'id\']'); // This evaluates whether the checkbox is checked or not
if (document.poppedLayer) { // if it is checked, make it visible, if not, hide it
document.poppedLayer.style.visibility = "visible";
} else {
document.poppedLayer.style.visibility = "hidden";
}
}
//-->
</SCRIPT>
<div id="div1">
<h3 align="center"> This JavaScript shows how to hide divisions </h3>
<table border=1 id="t1">
<tr>
<td>i am here!</td>
</tr>
</table>
</div>
<input type="checkbox" name="c1" onclick=showMe(div1) value=http://www.webdeveloper.com/forum/archive/index.php/"Show Active">Show Hide Checkbox