homepage Welcome to WebmasterWorld Guest from 54.227.141.230
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

    
Why doesn't my image rollover work in opera?
AgentIce




msg:1586381
 3:03 am on Jul 31, 2003 (gmt 0)

I use the following code for an image rollover which works in both IE and Netscape but not in opera:

bName = navigator.appName;
bVer = parseInt(navigator.appVersion);

if ((bName == "Netscape" && bVer >= 3) ¦¦ (bName == "Microsoft Internet Explorer" && bVer >= 4))
bCap = 1;
else
bCap = 0;

function ImageArray(asize) {
for (var lp = 0; lp < asize; lp++) {
this[lp] = new Array();
this[lp][0] = new Image();
this[lp][1] = new Image();
}
this.length = asize + 1;
}

function ImageOn(iname) {
if (bCap) {
document[iname].src = iArray[iname][1].src;
}
}

function ImageOff(iname) {
if (bCap) {
document[iname].src = iArray[iname][0].src;
}
}

iArray = new ImageArray(4);
iArray[0][0].src = "/images/home-bright.jpg";
iArray[0][1].src = "/images/home-dark.jpg";
iArray[1][0].src = "/images/excal-bright.jpg";
iArray[1][1].src = "/images/excal-dark.jpg";
iArray[2][0].src = "/images/commentaries-bright.jpg";
iArray[2][1].src = "/images/commentaries-dark.jpg";
iArray[3][0].src = "/images/cbrworks-bright.jpg";
iArray[3][1].src = "/images/cbrworks-dark.jpg";

Is it because of the browser version checking? I have opera set to identify itself as IE if that matters. If its the browser version checking what should I change it to?

Thanks,
AgentIce

 

korkus2000




msg:1586382
 2:38 pm on Aug 3, 2003 (gmt 0)

It maybe the browser checking. Have you tryied using a more basic string for IE in the checking?

AgentIce




msg:1586383
 11:51 pm on Aug 3, 2003 (gmt 0)

I'll try that, I haven't really messed with it at all since I just copied it from some tutorial site. Thanks for the help. :)

AgentIce

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Opera Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved