hi again,
here I am with another little problem...
I'm trying to make a javascript-menue where you can open the submenues with javascript.
the html:
<div style="float:left">
<a href="#" onClick="setVisibility('benutzer_bearbeiten_sub');" class="navbutton">Benutzer-Verwaltung</a>
<div id="benutzer_bearbeiten_sub" class="hidden">
<a href="benutzer_anlegen.php" class="navbutton_upunkt">Benutzer anlegen</a>
<a href="benutzer_bearbeiten.php" class="navbutton_upunkt">Benutzer bearbeiten</a>
</div>
</div>
the js:
<script language="JavaScript" type="text/JavaScript">
<!--
function setVisibility(strId)
{
if (document.getElementById(strId).className == "hidden")
{
document.getElementById(strId).className="visible";
}
else
{
document.getElementById(strId).className="hidden";
}
}
//-->
</script>
The problem:
When I open a submenu and Click on a link on it, on the next page the submenue is closed.
Is there a way to solve this with javascript?
thank you very much,
greets ben
here I am with another little problem...
I'm trying to make a javascript-menue where you can open the submenues with javascript.
the html:
<div style="float:left">
<a href="#" onClick="setVisibility('benutzer_bearbeiten_sub');" class="navbutton">Benutzer-Verwaltung</a>
<div id="benutzer_bearbeiten_sub" class="hidden">
<a href="benutzer_anlegen.php" class="navbutton_upunkt">Benutzer anlegen</a>
<a href="benutzer_bearbeiten.php" class="navbutton_upunkt">Benutzer bearbeiten</a>
</div>
</div>
the js:
<script language="JavaScript" type="text/JavaScript">
<!--
function setVisibility(strId)
{
if (document.getElementById(strId).className == "hidden")
{
document.getElementById(strId).className="visible";
}
else
{
document.getElementById(strId).className="hidden";
}
}
//-->
</script>
The problem:
When I open a submenu and Click on a link on it, on the next page the submenue is closed.
Is there a way to solve this with javascript?
thank you very much,
greets ben