Jump to content
Fórum Script Brasil
  • 0

Porque codigo JavaScript só funciona no Internet Explorer?


Suvaco de Cobra

Question

Boa tarde gente,

Copiei um menu em JavaScript, ele funciona perfeitamente no IE, porem nos outros navegadores não, não dá nenhuma mensagem de erro, na verdade o menu aparece, o que não aparece são os sub-menus.... já observei por exemplo nas opções do firefox e a opção javascript está ativada, não sei porque não carrega os submenus, segue o codigo java script abaixo:

var bBrowserOK; bBrowserOK = 0;if(parseFloat(navigator.appVersion)>=4) if(navigator.appName == 'Microsoft Internet Explorer') bBrowserOK = 1;document.write('<STYLE>');document.write('a.MN9580876 {text-decoration:none; color:#FCFCFC; font-weight: 700; font-family: Verdana; font-size: 12px; font-style:normal;} ');

document.write('a.MN9580876:hover {text-decoration:none; color:#FFFFFF; }');

document.write('a.SMN9580876 {text-decoration:none; color:#000000; font-weight: 400; font-family: Verdana; font-size: 11px; font-style:normal;} ');

document.write('a.SMN9580876:hover {text-decoration:none; color:#FFFFFF; }');

document.write('table.MT9580876 {background:#A0CAE5; border:3 outset #FFFFFF; }');

document.write('td.MTD9580876 {padding-left:4; padding-right:4; background:#76A5E8; border:2 outset #76A5E8; }');

document.write('.MTI9580876 {color:#FCFCFC; font-weight: 700; font-family: Verdana; font-size: 12px; font-style:normal;}');

document.write('.MSI9580876 {color:#000000; font-weight: 400; font-family: Verdana; font-size: 11px; font-style:normal;}');

document.write('</STYLE>');

function OpenMenu(MenuId){ MenuId.style.visibility = 'visible'; }

function CloseMenu(MenuId){ MenuId.style.visibility = 'hidden';}

function HLT9580876(TDId,AId){ TDId.style.background = '#517389'; if(AId) AId.style.color = '#FFFFFF';}

function UHLT9580876(TDId,AId){ TDId.style.background = '#76A5E8'; if(AId) AId.style.color = '#000000';}

function THLT9580876(TDId,AId){ TDId.style.background = '#517389'; if(AId) AId.style.color = '#FFFFFF';}

function TUHLT9580876(TDId,AId){ TDId.style.background = '#140087'; if(AId) AId.style.color = '#FCFCFC';}

function WSBH9580876(MenuId){

document.write('<span id=' + MenuId + ' STYLE="position:absolute; visibility:hidden; zorder:1; ">');

document.write('&nbsp;<br>');

document.write('<table class="MT9580876" cellspacing=2 cellpadding=2 onMouseOut="CloseMenu(' + MenuId + ');" onMouseOver="OpenMenu(' + MenuId + ');">');}

function WSIH9580876(ItemID,ItemName,ItemURL,MenuID,ItemTitle,ItemTarget){

document.write('<tr><td id="X' + ItemID + '" class="MTD9580876" onMouseOver="HLT9580876(X' + ItemID + ',' + ItemID + ');" onMouseOut="UHLT9580876(X' + ItemID + ',' + ItemID + ');">');

document.write('<span NOWRAP><a href="' + ItemURL + '" title="' + ItemTitle + '" class="SMN9580876" target="' + ItemTarget + '" id="' + ItemID + '">' + ItemName + '</a></span></td></tr>');}

function WSFH9580876(ItemID,ItemFree){

document.write('<tr><td id="X' + ItemID + '" class="MTD9580876" onMouseOver="HLT9580876(X' + ItemID + ',' + ItemID + ');" onMouseOut="UHLT9580876(X' + ItemID + ',' + ItemID + ');">');

document.write('<span id="' + ItemID + '" class="MSI9580876" >' + ItemFree + '</span></td></tr>');}

function CloseSubBoxH(){document.write('</table></span>');}

function WTIH9580876(MenuID,MenuName,MenuURL,MenuTitle,MenuTarget){

document.write('<span STYLE="position:relative;" class="MTI9580876" onMouseOver="OpenMenu(' + MenuID + ');" onMouseOut="CloseMenu(' + MenuID + ');"><a href="' + MenuURL + '" title="' + MenuTitle + '" target="' + MenuTarget + '" class="MN9580876">&nbsp;' + MenuName + '</a></span>');}

function WTFH9580876(MenuID,MenuFree){

document.write('<span STYLE="position:relative;" class="MTI9580876" onMouseOver="OpenMenu(' + MenuID + ');" onMouseOut="CloseMenu(' + MenuID + ');">&nbsp;' + MenuFree + '&nbsp;</span>');}

function WTHH9580876(MenuName,MenuURL,MenuTitle,MenuTarget){

document.write('<span STYLE="position:relative;" class="MTI9580876" ><a href="' + MenuURL + '" title="' + MenuTitle + '" target="' + MenuTarget + '" class="MN9580876">&nbsp;' + MenuName + '</a></span>');}

function WTHFH9580876(MenuName,MenuFree){

document.write('<span STYLE="position:relative;" class="MTI9580876" >&nbsp;' + MenuFree + '</span>');}

document.write('<TABLE CELLSPACING=0 CELLPADDING=5 WIDTH="100%" BGCOLOR=#140087 STYLE="border:1 inset #808080; "><TR VALIGN=MIDDLE><TD ALIGN=LEFT>');

document.write('<DIV NOWRAP STYLE="visibility:visible; background-color:#140087; font-weight: 700; font-family: Verdana; font-size:12px; ">');

if(bBrowserOK==1) {

WSBH9580876('MI9598766');

WSIH9580876('MI9603488','Quem somos','quemsomos.htm','MI9598766','','bottom');

if(MI9603488) MI9603488.style.color = '#000000';WSIH9580876('MI9608416','Missão','nossamissao.htm','MI9598766','','bottom');

if(MI9608416) MI9608416.style.color = '#000000';WSIH9580876('MI9591850','Fatores de sucesso','sucesso.htm','MI9598766','','bottom');

if(MI9591850) MI9591850.style.color = '#000000';WSIH9580876('MI9606001','Equipe de colaboradores','colab.htm','MI9598766','','bottom');

if(MI9606001) MI9606001.style.color = '#000000';WSIH9580876('MI9579950','Localização','localizacao.htm','MI9598766','','bottom');

if(MI9579950) MI9579950.style.color = '#000000';CloseSubBoxH();

WTIH9580876('MI9598766','Empresa','','','_self');

}

else

WTHH9580876('Empresa','','','_self');

document.write('&nbsp;<font color=#FFFFFF>|</font>');

if(bBrowserOK==1) {

WSBH9580876('MI9586633');

WSIH9580876('MI9584472','Produtos','produtos.htm','MI9586633','','bottom');

if(MI9584472) MI9584472.style.color = '#000000';WSIH9580876('MI9581752','Dep. de Vendas','depvendas.htm','MI9586633','','bottom');

if(MI9581752) MI9581752.style.color = '#000000';WSIH9580876('MI9594720','Carências','carencias.htm','MI9586633','','bottom');

if(MI9594720) MI9594720.style.color = '#000000';WSIH9580876('MI9589317','Corpo Clínico','corpoclinico.htm','MI9586633','','bottom');

if(MI9589317) MI9589317.style.color = '#000000';CloseSubBoxH();

WTIH9580876('MI9586633','Produtos','','','_self');

}

else

WTHH9580876('Produtos','','','_self');

document.write('&nbsp;<font color=#FFFFFF>|</font>');

WTHH9580876('Credenciados','credenciados.htm','','bottom');

document.write('&nbsp;<font color=#FFFFFF>|</font>');

if(bBrowserOK==1) {

WSBH9580876('MI9583395');

WSIH9580876('MI9582696','Informativos','informativos.htm','MI9583395','','bottom');

if(MI9582696) MI9582696.style.color = '#000000';WSIH9580876('MI9597323','Eventos','aniversariantes.htm','MI9583395','','bottom');

if(MI9597323) MI9597323.style.color = '#000000';CloseSubBoxH();

WTIH9580876('MI9583395','Informativos','','','');

}

else

WTHH9580876('Informativos','','','');

document.write('&nbsp;<font color=#FFFFFF>|</font>');

WTHH9580876('Manual do usuário','Manualusuario.htm','','bottom');

document.write('&nbsp;<font color=#FFFFFF>|</font>');

WTHH9580876('Fale conosco','faleconosco.htm','','bottom');

document.write('&nbsp;<font color=#FFFFFF>|</font>');

WTHH9580876('Principal','new_page_1.htm','','bottom');

document.write('</DIV></TD>');

document.write('</TR></TABLE>');

Obs: Tentei no FireFox, no Opera, e no Chrome. Aguardo e obrigado!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.5k
×
×
  • Create New...