Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Opera dhtml messing with my head

any ideas on how to get this to work?



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

10+ Year Member

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.


<script language="JavaScript1.2">
BlankImage=new Image();
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)
var IEver4=0;
if (document.all)
var vers=navigator.appVersion;
if (vers.substring(0,1)=="4")
var IEMac4=0;
if ((IEMac==1) && (IEver4==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=\"";
else if(NS6)
else if(IEver4)


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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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:



Featured Threads

Hot Threads This Week

Hot Threads This Month