Su un vecchio sito di un cliente ho trovato una cosa del genere:
---------------inizio CODICE--------------------------------
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var totalLayersInLoop=9;
var layerNumShowing=4;
function init(){
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
}else{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
} }
function showLayerNumber(number){
var layerNumToShow=number;
hideLayer(eval('"layer' + layerNumShowing+'"'));
showLayer(eval('"layer' + layerNumToShow+'"'));
layerNumShowing=layerNumToShow; }
function showLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"'); }
function hideLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); }
</SCRIPT>
<STYLE TYPE="text/css">
#layer1 {POSITION:absolute; Z-INDEX:10; VISIBILITY:visible; LEFT:-1px; TOP:143px; width:146px; height:48px; }
e blabla per 11 layer...
</STYLE>
</HEAD>
<body onload="init()" blabla>
<div id="layer1"><a HREF="javascript:showLayerNumber(4)">
[img]img/bust.gif[/img]</a></div>
blabla
<div id="layer4">[img]img/busta.gif[/img]</div>
blabla
</BODY>
</HTML>
---------------inizio CODICE--------------------------------
Ovviamente la "cosa del genere" è vecchissima e non funziona con firefox... esiste un modo per aggiornarlo velocemente o devo reimpostare tutto da capo?![]()

Rispondi quotando