Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fading Images, problem in netscape

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have a problem with fading buttons(or images) in netscape, it all works fine in IE.
Anyone knows what to add so it could work also in netscape??
This is what I put in

Headsection
<head>

<script language=&quot;JavaScript1.2&quot;>

function makevisible(cur,which){

if (which==0)

cur.filters.alpha.opacity=100

else

cur.filters.alpha.opacity=20

}

</script>

And in image source this wil be extra:

style=&quot;filter:alpha(opacity=20)&quot; onMouseover=&quot;makevisible(this,0)&quot; onMouseout=&quot;makevisible(this,1)
 
as far as i know you are using an IE filter and hence it will never work in netscape. ive just used the same filter in a project and had to just have a fade-in for IE and an apeear at full opacity for netscrap.

more NS crap Grrrrrr.

:)
 
I noticed it didn't work in NS.

If there is another code with the same effect that works in both NS and IE, I would be glad if you could help me s-)
 
I got this code from someone, but it hasn't the same effect, but seems to work in IE and NS, what could I change that it has same effect as previous code??

<script language=&quot;JavaScript1.2&quot;>
function high(which2)
{theobject=which2
highlighting=setInterval(&quot;highlightit(theobject)&quot;,50)
}function low(which2)
{clearInterval(highlighting)
which2.filters.alpha.opacity=40
}function highlightit(cur2)
{if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if(window.highlighting)
clearInterval(highlighting)
}
</script>

This in image src: ONMOUSEOVER=&quot;high(this)&quot; ONMOUSEOUT=&quot;low(this)&quot; class=&quot;inset&quot; style=&quot;FILTER: alpha(opacity=50)&quot;>
 
Doesn't seem to work in Netscape 6.2

I think Netscape lost a lot of cool code when they rewrote the browser. decided to go with the script standard with no exceptions. (shoot self in foot).

I'm actually looking for similar code that will work in netscape/ mozilla/ opera etc, so if anyone has any please post!

Looks like I'll have to make some animated gifs (bum)

Cheers
Glyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top