Newsgroup: it.comp.lang.javascript
Titolo: layer NN6





Salve a tutti vorrei chiedere aiuto riguardo la 
possibilità di adattare lo script presente a NN6


Spero che qualcuno mi aiuti, perchè da solo non 
sono riuscito.


Grazie a tutti


Walter


 


<HTML><HEAD><TITLE>Dynamic 
HTML</TITLE>
<SCRIPT language=JavaScript>


 


  var totalLayersInLoop=3;


 


 var layerNumShowing=1;


 


 


 


 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 showPreviousLayer(){


 


   var 
layerNumToShow=layerNumShowing-1;


 


   if (layerNumToShow < 
1){layerNumToShow=totalLayersInLoop;}


 


   hideLayer(eval('"layer' + 
layerNumShowing+'"'));


 


   showLayer(eval('"layer' + 
layerNumToShow+'"'));


 


   layerNumShowing=layerNumToShow; 
 }


 


 


 


 function showNextLayer(){


 


   var 
layerNumToShow=layerNumShowing+1;


 


   if (layerNumToShow > 
totalLayersInLoop){layerNumToShow=1;}


 


   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 {
 LEFT: 
150px; POSITION: absolute; TOP: 180px; VISIBILITY: visible; Z-INDEX: 
10
}
#layer2 {
 LEFT: 150px; POSITION: absolute; TOP: 180px; 
VISIBILITY: hidden; Z-INDEX: 20
}
#layer3 {
 LEFT: 150px; 
POSITION: absolute; TOP: 180px; VISIBILITY: hidden; Z-INDEX: 
30
}
#loopControls {
 LEFT: 300px; POSITION: absolute; TOP: 150px; 
VISIBILITY: visible; Z-INDEX: 40
}
</STYLE>


 


<META content="MSHTML 5.00.2014.210" 
name=GENERATOR></HEAD>
<BODY bgColor=white 
onload=init()>
<DIV id=layer1 style="background-color: #0000FF"> 

  <p>qqqqqqqqqqqqq</p>
</DIV>
<DIV id=layer2 
style="background-color: #FFFF00">
  
<p>qqqqqqqqqqqqq</p>
</DIV>
<DIV id=layer3 
style="background-color: #FF0000">
  
<p>qqqqqqqqqqqqq</p>
</DIV>
<DIV 
id=loopControls><A 
href="javascript:showPreviousLayer()">Precedente</A> 

<BR><A href="javascript:showNextLayer()">Successivo</A> 
<BR><A 
href="javascript:showLayerNumber(1)">Layer numero 
1</A> <BR><A 
href="javascript:showLayerNumber(2)">Layer 
numero 2</A> <BR><A 

href="javascript:showLayerNumber(3)">Layer numero 3</A> 
<BR></DIV>
</BODY></HTML>



"Walter" <dacosan...@NOSPAMtiscalinet.it> ha scritto nel messaggio
news:99o8n6$vjv$1...@pegasus.tiscalinet.it...
Salve a tutti vorrei chiedere aiuto riguardo la possibilità di adattare lo
script presente a NN6
Spero che qualcuno mi aiuti, perchè da solo non sono riuscito.
Grazie a tutti
Walter
fatto..........
<HTML><HEAD><TITLE>Dynamic HTML</TITLE>
<SCRIPT language=JavaScript>
  var totalLayersInLoop=3;
 var layerNumShowing=1;
 function init(){
          if (document.layers) {
      layerStyleRef="layer.";
    layerRef="document.layers";
   styleSwitch="";
   }else if(document.all ){
    layerStyleRef="layer.style.";
   layerRef="document.all";
    styleSwitch=".style";
   }
   else if(document.getElementById){
     layerStyleRef="layer.style.";
   layerRef="document.getElementById";
    styleSwitch=".style";
   }
}
 function showLayerNumber(number){
   var layerNumToShow=number;
  hideLayer(eval('"layer' + layerNumShowing+'"'));
   showLayer(eval('"layer' + layerNumToShow+'"'));
   layerNumShowing=layerNumToShow;   }
 function showPreviousLayer(){
   var layerNumToShow=layerNumShowing-1;
   if (layerNumToShow < 1){layerNumToShow=totalLayersInLoop;}
   hideLayer(eval('"layer' + layerNumShowing+'"'));
   showLayer(eval('"layer' + layerNumToShow+'"'));
   layerNumShowing=layerNumToShow;  }
 function showNextLayer(){
   var layerNumToShow=layerNumShowing+1;
   if (layerNumToShow > totalLayersInLoop){layerNumToShow=1;}
   hideLayer(eval('"layer' + layerNumShowing+'"'));
   showLayer(eval('"layer' + layerNumToShow+'"'));
   layerNumShowing=layerNumToShow;  }
 function showLayer(layerName){
    if(document.all || document.layers){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
    }
    else{
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="visible"');
    }
   }
 function hideLayer(layerName){
  if(document.all || document.layers){
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
  }
  else{
   eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="hidden"');
  }
 }
 </SCRIPT>
<STYLE type=text/css>#layer1 {
 LEFT: 150px; POSITION: absolute; TOP: 180px; VISIBILITY: visible; Z-INDEX:
10
}
#layer2 {
 LEFT: 150px; POSITION: absolute; TOP: 180px; VISIBILITY: hidden; Z-INDEX:
20
}
#layer3 {
 LEFT: 150px; POSITION: absolute; TOP: 180px; VISIBILITY: hidden; Z-INDEX:
30
}
#loopControls {
 LEFT: 300px; POSITION: absolute; TOP: 150px; VISIBILITY: visible; Z-INDEX:
40
}
</STYLE>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY bgColor=white onload=init()>
<DIV id=layer1 style="background-color: #0000FF">
  <p>qqqqqqqqqqqqq</p>
</DIV>
<DIV id=layer2 style="background-color: #FFFF00">
  <p>qqqqqqqqqqqqq</p>
</DIV>
<DIV id=layer3 style="background-color: #FF0000">
  <p>qqqqqqqqqqqqq</p>
</DIV>
<DIV id=loopControls><A href="javascript:showPreviousLayer()">Precedente</A>
<BR><A href="javascript:showNextLayer()">Successivo</A> <BR><A
href="javascript:showLayerNumber(1)">Layer numero 1</A> <BR><A
href="javascript:showLayerNumber(2)">Layer numero 2</A> <BR><A
href="javascript:showLayerNumber(3)">Layer numero 3</A> <BR></DIV>
</BODY></HTML>
andreotta fabiano
 WebMªster ATI POWER s.n.c.
 
andr...@atipower.it
 
http://www.aticommerce.com
  (new  cd-dvd-vhs)
 
http://www.atipower.it
 
http://www.afdsoftware.freeweb.org
 
http://www.jsdir.com

 wrote in message
99pesr$aon$1...@fe1.cs.interbusiness.it...

Siete dei fenomeni paranormali!
Ti ringrazio molto
Walter