Salve a tutti. Premetto che ho visto che c'è già una discussione aperta in questi giorni, ma, visto che il problema non è ancora stato risolto, ho preferito aprire una nuova discussione per non creare maggiore confusione.
Utilizzo una barra di attesa nella prima pagina del mio sito che in IE appare tranquillamente, mentre in Firefox/Safari non appare. Penso che ci sia qualche errore nello script della barra, anche perchè esegue senza nessun tipo di problema il redirect. Stessa cosa succede anche con uno script per il menu: con IE tutto bene, con Firefox appaiono più scritte una sopra l'altra.
Questo è Javascript (ho messo anche CSS per completezza) della barra di attesa.
E questi Javascript e CSS del menu.codice:body {background-color: #FFC242;} #bar, #barbackground{ position:absolute; left:0; top:0; background-color: #FF9F4F; } #barbackground{ background-color: #D3D3D3; } --> </style> <script language="JavaScript1.2" type="text/javascript"> <!-- var duration=5; var message = ""; var font_size = 3; var font_face = "verdana"; var NS6redirection = "index0.html"; var bar_width = 200; var bar_height = 15; var centered = (screen.width) ? (screen.width-bar_width)/2 : 0; function postaction(){ window.location="index0.html" } var clipright=0 var widthIE=0 var widthNS=0 function initializebar(){ if (document.all){ baranchor.style.visibility="visible" widthIE=bar.style.pixelWidth startIE=setInterval("increaseIE()",50) } if (document.layers){ widthNS=document.baranchorNS.document.barbackgroundNS.clip.width document.baranchorNS.document.barNS.clip.right=0 document.baranchorNS.visibility="show" startNS=setInterval("increaseNS()",50) } } function increaseIE(){ bar.style.clip="rect(0 "+clipright+" auto 0)" window.status="Attendere..." if (clipright<widthIE) clipright=clipright+(widthIE/(duration*20)) else{ window.status='' clearInterval(startIE) postaction() } } function increaseNS(){ if (clipright<202){ window.status="Attendere..." document.baranchorNS.document.barNS.clip.right=clipright clipright=clipright+(widthNS/(duration*20)) } else{ window.status='' clearInterval(startNS) postaction() } } window.onload=initializebar
Potete aiutarmi? Grazie anticipatamente.codice:<script type="text/javascript"> window.onload=function(){ if(document.getElementsByTagName && document.getElementById){ document.getElementById("menu").className="jsenable"; BuildList(); } } function BuildList(){ var hs=document.getElementById("menu").getElementsByTagName("h3"); for(var i=0;i<hs.length;i++){ hs[i].onclick=function(){ this.parentNode.className=(this.parentNode.className=="show") ? "hide" : "show"; } } } </script> <style type="text/css"> div#menu{width:100%;background: #FECC2B; border: 1px solid #FFF; font: 14px Arial, Helvetica, sans-serif} div#menu h3{font-size: 100%;margin: 0; border-top: 1px solid #FFF;color: #000;background-color: #FECC2B} div#menu ul,div#menu li{margin: 0;padding: 0;list-style-type: none} div#menu ol,div#menu li{margin: 0;padding: 0;list-style-type: none; background-color: #FEB22B;} div#menu li{border-top: 1px solid #FFF;font-weight: bold;} div#menu a{display: block;height: 18px;line-height: 18px; border-top: 1px solid #FFF;background-color: #FECC2B;color: #000; text-decoration: none;font-weight: bold} div#menu ul ul a{color: #333; background-color: #FEB22B;font-weight: bold} div.jsenable h3{cursor: pointer} div.jsenable ul ul{display:none} div#menu li.hide ul{display:none} div#menu li.show ul{display:block} div#menu li.show h3{background-color: #FF0} </style>

Rispondi quotando