Forum Moderators: open
Exerp from my func.js:
// Functionsfunction hide(id)
{
element = document.GetElementById(id);
element_id.style.visibility = "hidden";
}
function show(id)
{
element = document.getElementById(id);
element_id.style.visibility = "show";
}
The DIV:
<div id="divgallerymenu" style="position:absolute; left:161px; top:276px; width:159px; height:190px; z-index:1; background-color: #FF0000; layer-background-color: #FF0000; border: 1px none #000000; visibility:hidden">
<p>Flash Gallery</p>
<p>Animated GIF</p>
<p>Picture</p>
</div>
The link:
<a href="javascript://" onClick="show('divgallerymenu')">Galleries</a>
I'd appreciate some help. The DIV refuses to show.
:)
PS write:
var element = document.getElementById(id);
to make it a local variable. Not an 'error', but better.
AND
This:
<a href="javascript://" onClick="show('divgallerymenu')">Galleries</a>
might be better as:
<a href="#" onClick="show('divgallerymenu');return false">Galleries</a>