J
Jason & Juli Cook
I have a layer containing a table. The layer is inside a centered
containing table. If the layer is hidden, I want the form (surrounding
table) to collapse. I want to toggle this effect with a checkbox. I can
get the layer to come on, but not toggle. Also, it starts as hidden and
there is a big gap where the table should be. What do I do?
For the javascript, I've tried different versions of the following:
function ChangeState(){
if(document.getElementById(myCheckBox).checked){
theForm.myLayer.style.display='block';
}
}
My div tag works:
<div id="myLayer" style="display: none;">
My checkbox tag includes the following:
onClick="ChangeState();"
containing table. If the layer is hidden, I want the form (surrounding
table) to collapse. I want to toggle this effect with a checkbox. I can
get the layer to come on, but not toggle. Also, it starts as hidden and
there is a big gap where the table should be. What do I do?
For the javascript, I've tried different versions of the following:
function ChangeState(){
if(document.getElementById(myCheckBox).checked){
theForm.myLayer.style.display='block';
}
}
My div tag works:
<div id="myLayer" style="display: none;">
My checkbox tag includes the following:
onClick="ChangeState();"