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





Ciao sono Walter vi chiedo nuovamente aiuto, non 
riesco a rendere funzionante per NN6 questo script 


Potreste aiutarmi?


Vi ringrazio .


Ciao


Walter


<html>
<head>
<title>Cross-browser Dynamic HTML 
Scripts - ZoomFade</title>


 


<script type="text/javascript" 
language="JavaScript">


 


function 
checkBrowser(){
 this.ver=navigator.appVersion
 this.dom=document.getElementById?1:0
 this.ie5=(this.ver.indexOf("MSIE 
5")>-1 && this.dom)?1:0;
 this.ie4=(document.all && 
!this.dom)?1:0;
 this.ns5=(this.dom && parseInt(this.ver) >= 
5) ?1:0;
 this.ns4=(document.layers && 
!this.dom)?1:0;
 
this.bw
=(this.ie5 || this.ie4 || this.ns4 || 
this.ns5)
 return this
}
bw=new checkBrowser()


 


zText=new 
Array('prova','1','2','3...')
  


 


zColor=new 
Array('#202240','#424242','#8E8E8E','#C2C2C2','#E8E8E8')
 
var 
zEndSize=50 
file://The
 fontsize in px you want the zoom 
to end at
var zSpeed=90//Zoom speed
var zAddSize=5 
file://Px
 to add to the fontsize on each interval
var 
zFadeSpeed=70 
file://Color
 change/fade speed
var 
zFont='Arial Black,Arial,Helvetica' 
file://Font
var 
zHide=true 
file://do
 you want it to hide when its done? 
(true or false)
var zHideWait=100//Time to wait before hiding
var 
zStartSize=10 
file://The
 size to start at
var 
zEndCode="" // Code to execute when the zoom and fade is finished. ie: 
"location.href='newpage.html', executes when the hide does.


 


 


 


 


 


function 
makeZoomObj(obj,font,size,endsize,color,text,zspeed,fadespeed,addsize,hide,hidewait,endcode){
   
 this.css=bw.dom? 
document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0; 
   
 this.writeref=bw.dom? 
document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0; 
 this.zoomWrite=b_zoomWrite; this.zoomIt=b_zoomIt; 
this.fadeIt=b_fadeIt; this.zoomFade=b_zoomFade;
 this.font=font; 
this.color=new Array(); this.color=eval(color); this.text=new Array(); 
this.text=eval(text);
 this.zspeed=zspeed; this.fadespeed=fadespeed; 
this.addsize=addsize; this.endcode=endcode
 this.hide=hide; 
this.hidewait=hidewait; this.size=size; this.startsize=size; 
this.endsize=endsize
 if(size<endsize){this.way="<"; 
this.addsize=this.addsize
    }else{this.way=">"; 
this.addsize=-this.addsize}
 if(bw.dom || bw.ie4){ 
file://Setting
 the style 
properties
  this.css.fontFamily=this.font; 
this.css.fontSize=this.size; 
this.css.color=this.color[0]
 }
 this.obj = obj + "Object"; 
 eval(this.obj + "=this"); return this
}
function 
b_zoomFade(num){
 if(num<this.text.length){
  this.size=this.startsize
  this.zoomIt(num,'this.zoomFade('+(num+1)+')')
 }
 else 
if(num==this.text.length) 
this.fadeIt(0,'this.zoomFade('+(num+1)+')')
 else if(this.hide) 
setTimeout(this.obj+".css.visibility='hidden'; 
eval("+this.obj+".endcode)",this.hidewait)
}
function 
b_zoomWrite(num,cnum){
 if(bw.ns4){
  this.writeref.write('<span 
style="text-align:center; font-size:' +this.size+'px; font-family:'+this.font+'; 
color:'+this.color[cnum]+'">'+this.text[num]+'</span>')
  this.writeref.close()
 }else 
if(bw.dom){ 
file://M10
 workaround, adding span to 
change color 
in.
  spantag=document.createElement("SPAN")
  
spantag.id
=this.obj+"span";
  this.writeref.replaceChild(spantag,this.writeref.childNodes[0])
  this.writeref.childNodes[0].appendChild(document.createTextNode(""))
  this.writeref.childNodes[0].replaceChild(document.createTextNode(this.text[num]),this.writeref.childNodes[0].childNodes[0])
 }else 
if(bw.ie4) this.writeref.innerHTML=this.text[num]
}
function 
b_zoomIt(num,fn){
 if(eval(this.size+this.way+this.endsize)){
  if(this.size==this.startsize 
|| bw.ns4) this.zoomWrite(num,0)
  if(bw.dom || bw.ie4) 
this.css.fontSize=this.size
  this.size=this.size+this.addsize
  setTimeout(this.obj+".zoomIt("+num+",'"+fn+"')",this.zspeed)
 }else 
eval(fn) 
}
function 
b_fadeIt(num,fn){
 if(num<this.color.length){
  if(bw.ns4) 
this.zoomWrite(this.text.length-1,num)
  else{
   obj=bw.ie4?this.css:document.getElementById(this.obj+"span").style;
   obj.color=this.color[num]
  }
  num++
  setTimeout(this.obj+".fadeIt("+num+",'"+fn+"')",this.fadespeed)
 }else 
eval(fn) 
}


 


function 
zoomInit(){
 if(
bw.bw
){
  oZoom=new 
makeZoomObj('divZoom',zFont,zStartSize,zEndSize,'zColor','zText',zSpeed,zFadeSpeed,zAddSize,zHide,zHideWait,zEndCode)
  oZoom.zoomFade(0)
  oZoom.css.visibility='visible'
 }
}
</script>
</HEAD>
<BODY 
bgcolor="White" onload="zoomInit()">
<div id="divZoom" 
style="position:absolute; left:163px;top:42px;width:100%;z-index:300" 
align="center"><!-- older browsers will not see this 
--></div>


 


</BODY>
</HTML>


 


 



"Walter" <dacosan...@NOSPAMtiscalinet.it> ha scritto nel messaggio
news:8vj1ec$84i$1...@lacerta.tiscalinet.it...
Ciao sono Walter vi chiedo nuovamente aiuto, non riesco a rendere
funzionante per NN6 questo script
Potreste aiutarmi?
Vi ringrazio .
Ciao
Walter
Come non funziona??
intendi che non si ingrandiscono i caratteri...con NN6???
verifica il codice con l'esempio che ti metto sotto.............se il
fontSize non è impostato correttamente in NN6 non funxia...
deve essere nel formato  valore+pt....cioè esempio   fontSize="40pt"
<html>
<head>
<title>Test</title>
<script language="JavaScript1.3">
var aa=20;
function cambia(){
document.getElementById('pippo').style.fontSize=aa+'pt'
aa=aa+5
if(aa==60){
aa=20;
}
setTimeout('cambia()',500)
}
setTimeout('cambia()',500)
</script>
</head><body >
<div id="pippo" style="position:absolute; font-size:22px;">
<p>Ciao!</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;
</p>
<p>&nbsp;
</p>
<p>&nbsp;
</p>
<p><br>
</p>
<p><br>
<br>
<br>
</p>
<p></p>
</body></html>
andreotta fabiano
WebMªster ATI POWER s.n.c.
andr...@atipower.it
http://www.atipower.it
http://www.aticommerce.com
http://www.afdsoftware.freeweb.org
http://www.jsdir.com
http://www.javascript.3000.it



ti ringrazio
A presto
Walter

 ti ringrazio
Potevi cmq chiedere direttamente all'autore dello script, ovvero Brattli.