homepage Welcome to WebmasterWorld Guest from 54.163.70.249
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

    
Opera dhtml messing with my head
any ideas on how to get this to work?
xcandyman




msg:1583609
 1:43 pm on Dec 10, 2002 (gmt 0)

Hi everyone.

Ive created a dhtml menu with text rollovers and background change colours. But the problem is in opera when I rollover a part of my navigation it dosnt change back to its original state. Can anyone have a look at the below snippet which i think may be causing the problem. Note if you need any more code just ask.

Thanks

------------------------------------------------------------
<script language="JavaScript1.2">
BlankImage=new Image();
BlankImage.src="blank.gif";
var Opera=(navigator.userAgent.indexOf("Opera")!=-1)?1:0;
var Opera6=(navigator.userAgent.indexOf("Opera 6")!=-1)?1:0;
var Konqueror=(navigator.userAgent.indexOf("Konqueror")!=-1)?1:0;
var NS4=(document.layers)?1:0;
var IEMac=0;
if ((navigator.appVersion.indexOf("Mac")!= -1) &&!NS4)
IEMac=1;
var IEver4=0;
if (document.all)
{
var vers=navigator.appVersion;
if (vers.substring(0,1)=="4")
IEver4=1;
}
var IEMac4=0;
if ((IEMac==1) && (IEver4==1))
IEMac4=1;
var NS6=0;
if (!NS4 &&!IEver4)
NS6=(document.getElementsByTagName("*") &&!document.all)?1:0;
var EnableDMenu=(NS4¦¦NS6¦¦IEver4¦¦Opera6);
var _tempStr_="<scrip";
_tempStr_+="t type=\"";
_tempStr_+="text/javascript\" src=\"";
if(Opera6)
_tempStr_+="stm30op6.js";
else if(NS6)
_tempStr_+="stm30nn6.js";
else if(IEver4)
_tempStr_+="stm30ie4.js";
else
_tempStr_+="stm30uns.js";
_tempStr_+="\"></scr";
_tempStr_+="ipt>";
document.write(_tempStr_);

 

tedster




msg:1583610
 11:33 pm on Dec 10, 2002 (gmt 0)

First, I gotta say I've learned to HATE these danged DHTML menus. Not just as a developer, but as a user I think they're confusing -- both from a navigation point of view and because they misfire much too often.

Now that I got that off my chest, it looks like the code you've posted is essentially the browser sniffer. I'd be suspect of the .js file called from this line:

if(Opera6)
_tempStr_+="stm30op6.js";

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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved