How does this FadeIn-FadeOut script look in Netscape?

liunx

Guest
Can anybody tell me how this FadeIn - FadeOut script lookis in Netscape. It works in IE but does it also in NS?<br />
<br />
<html><br />
<head><br />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><br />
<meta name="generator" content="Adobe GoLive 4"><br />
</head><br />
<br />
<body><br />
<div id="divtofade" style="filter:alpha(opacity=0); width:250;"><br />
<h1>text1</h1><br />
</div><br />
<div id="divtofade2" style="filter:alpha(opacity=0); width:250;"><br />
<h1>text2</h1><br />
</div><br />
<div id="divtofade3" style="filter:alpha(opacity=0); width:250;"><br />
<h1>text3</h1><br />
</div><br />
<p><br />
<script language="JavaScript"><!--<br />
function doFadeIn(fadeName,maxPct) <br />
{ <br />
var fadeObj = document.getElementById(fadeName) <br />
if (fadeObj.filters.alpha.opacity < maxPct) <br />
{ <br />
fadeObj.filters.alpha.opacity += 2 <br />
//fadeObj.filters.alpha.opacity=divtofade.filters.alpha.opacity+4 <br />
setTimeout("doFadeIn('" + fadeObj.id + "'," + maxPct + ")",50) <br />
} <br />
} <br />
<br />
function doFadeOut(fadeName,maxPct) <br />
{ <br />
var fadeObj = document.getElementById(fadeName) <br />
if (fadeObj.filters.alpha.opacity > -1) <br />
{ <br />
fadeObj.filters.alpha.opacity += -4 <br />
//fadeObj.filters.alpha.opacity=divtofade.filters.alpha.opacity-4 <br />
setTimeout("doFadeOut('" + fadeObj.id + "'," + maxPct + ")",50) <br />
} <br />
} <br />
<br />
setTimeout("doFadeIn('divtofade2',100)",2000) <br />
setTimeout("doFadeIn('divtofade',100)",1000) <br />
setTimeout("doFadeIn('divtofade3',100)",3000) <br />
setTimeout("doFadeOut('divtofade3',100)",5000)<br />
setTimeout("doFadeOut('divtofade2',100)",7000)<br />
setTimeout("doFadeOut('divtofade',100)",9000)<br />
<br />
// --><br />
</script><br />
</body><br />
</html><br />
<br />
Kippie<!--content-->In NN 6.2, only the text showed (the filter thing didn't take effect)<!--content-->Getin a Javascript error in 4.7 :D But the text shows without the fade in/out effect<!--content-->Kippie I gave you the code to stop the error in Netscape.<br />
Why don't you use it?<!--content-->Thanks for your reactions. Is it correct that all texts show right away from the beginning and stay there in all versions of NS ?<br />
Kippie<!--content-->Hi Jon,<br />
Only this morning I saw your reply that you gave the code to stop the error in Netscape. Sorry. I probably overlooked it. But I don't understand. As far as I can find your reactions on questions for help on this fading stuff I did not find any solution for Netscape. I have understood from you that this fading is not possible with Netscape. But maybe I have overlooked something or misunderstood. The way I'm trying to do it is using the alpha-filters for IE while I make a shadow site for users of Netscape with no fading but with layers which change from visible to invisible and vice versa. <br />
But maybe I have missed something. Anyhow thanks for all your attention and help.<br />
Kippie<!--content-->Originally posted by kippie <br />
Thanks for your reactions. Is it correct that all texts show right away from the beginning and stay there in all versions of NS ?<br />
Kippie <br />
<br />
That is right, the text shows just like normal text (right away) in all Netscape browsers, looks cool in IE though :)<!--content-->
 
Back
Top