Forum Moderators: open
And silly me, what I should have said is, to make the fades work what I need is a function that takes the opacity of a div and adds one percent to it.
And I'm trying to get the cross browser code working because I want to be friendly to netscape users too.
The function below works great, and I need one that takes the opacity of a div and adds one percent to it.
like function changeOpacity() {opacity=opacity+1}. But I know that one won't work.
I know you're probably gone for now Orion and you did a good job.
Can someone help?
<html>
<head>
<DIV id=Image style="position:absolute; left=50; top=50; filter:alpha(opacity=10);">
<IMG src="Files/Image 1.jpg">
</DIV>
</head>
<body>
<SCRIPT language=Javascript>
function changeOpacity()
{document.all.Image.style.filter='alpha(opacity=50)';}
changeOpacity()
</script>
</body>
</html>
var opacity;
function changeOpacity()
{if (opacity<100) {opacity++;}
document.all.Image.style.filter='alpha(opacity='+opacity+')';
document.all.Image.style.MozOpacity=eval(opacity/100);
}
i think all should work when, if you need to change opacity after some time you need to make this
setInterval(changeOpacity,1000);
this will change opacity each second
Good luck to you