Show/Hide Layers w/checkbox


dw 8

i need show/hide layer based on whether or not checkbox checked.
can make layer show several different methods (onclick, onchange),
but can't make layer hide again when unchecked. there tutorial
somewhere?

thanks...


you use conditional statement. if div( layer) has display:none -
change display:block . second case if set
display:block. "else" statement change display:none.
i sure there more elegant ways of doing this, should work.
"t" id of div(layer).
<script type="text/javascript">
<!--
function chgdisplay() {
var theelement = document.getelementbyid("t");
if (theelement.style.display = "none") {
theelement.style.display = "block";
}
else {
theelement.style.display = "none";
}
}
//-->
</script>

"william clay" <william.c.clay@janacore.com> wrote in message
news:enf2qn$t23$1@forums.macromedia.com...
> dw 8
>
> need show/hide layer based on whether or not checkbox checked.
> can make layer show several different methods (onclick,
> onchange), can't make layer hide again when unchecked. there
> tutorial somewhere?
>
> thanks...
>




More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial