Bem pessoal, tenho este menu que ao chamar a funçao exibemenu() em javascript ele exibe o menu na tela, e ao clicar novamente ele apaga.
O problema é que gostaria de exibir o menu ao iniciar a pagina, mas que o programa soubesse e o menu Tiver na tela ele seja fechado, assim, Quando iniciar a primeira vez o programa, o menu é mostrado, e ao iniciar novamente ele desaparece.
Já tentei mudar a variavel menustatus mas não consegui mudança alguma...
Tambem utilizei a funcao : location.href='javascript:exibemenu()', mas o menu aparece quando ao iniciar o programa, mas não desaparece na Segunda vez..
function inicio() {
if (document.layers) texto=document.textomenu
if (document.all) texto=textomenu.style
}
var menustatus=0;
function exibemenu() {
if (document.layers) texto=document.textomenu
if (document.all) texto=textomenu.style
if (menustatus==1){
if (document.layers){
texto.visibility="hide";
menustatus=0;
return;
}
else{
texto.visibility="hidden";
menustatus=0;
return;
}
}
if (menustatus==0) {
if (document.layers){
texto.visibility="show";
menustatus=1;
}
else{
texto.visibility="visible";
menustatus=1;
}
}
}
</script>
<style>
#textomenu {
visibility:hidden;
position:absolute;
width:152px;
top:30px;
left:181px;
border-color:blue;
border-width:2px;
background-color:33FFFF; orange;
color:blue;
}
</style>
</HEAD>
<BODY onload=inicio() >
<a href="javascript:exibemenu();">teste </a>
<div ID=textomenu>
<a href="http://ewww..www </a>xxxx<br>
<a href="http://www.wwwbr/">outro teste</a>
<a href="http://teste novo/">Novo texte</a>
</div>