-
Using JS
I want a table to be displayed depending on whether a check box is marked or not. I am doing this by the onClick event.
Code:
<input type = checkbox name = "temp" size = 4 maxlength = 4 value = "90" onClick=getTable()>
But how do I write the code? Any suggestions for the JavaScript code? Can I include the request.querystring("temp") in the JavaScript function?
Code:
<script language=javascript>
function getTable()
{
???
}
</script>
-
Add an ID="tempid" in that, and put in this code:
if (tempid.checked == true) {
[tableID].style.visibility = "visible";
}
if (tempid.checked == false) {
[tableID].style.visibility = "hidden";
}
The [tableID] is the ID of the table you want to show. Put a Style tag in that table:
STYLE="visibility:hidden;"
You should be all set.