...

View Full Version : show/hide question



shierra
07-07-2006, 03:58 PM
<script>
<!--
var state = 'none';

function showhide(layer_ref) {

if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.display = state;
}
}
//-->
</script>

and


<a href="#" onclick="showhide('stuff');">Stuff</a>

<div id="stuff" style="display: block;">
<a href="blah.aspx">Menu Stuff</a>
<br /><a href="blah.aspx">Menu Stuff</a>
</div>

Is there a way for the menu to stay open once some clicked on a "Menu Stuff" link and is transported to that page?

Thanks in advance. :)

feras_wilson
07-07-2006, 04:09 PM
<head>
<meta http-equiv="Content-Language" content="sv">
<script>
function showhide() {
if(mylayer.style.visibility=='hidden')
mylayer.style.visibility='visible'
else
mylayer.style.visibility='hidden'
}
</script>
</head>

<div style="position: absolute; width: 158px; height: 100px; z-index: 1; left: 47px; top: 90px" id="mylayer">
This is the layer!!</div>
<p><a href="#" onclick="showhide()">Show/hide layer</a></p>


This works :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum