Nile, i couldnt get your script working correctly. Everytime i clicked the button, the page did refresh. I have one here that are compatiple with more browsers if needed.
Code:
<script language="javascript">
var state = 'hidden';
function showhide(layer_ref) {
if (state == 'visible') {
state = 'hidden';
}
else {
state = 'visible';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
}
}
</script>
Code:
<div id="toggle" style="visibility:hidden;">Content</div>
or
<div id="toggle" style="visibility:visible;">Content</div>
<a href="javascript://" onclick="showhide('toggle');">Toggle</a>
Bookmarks