Wade,

I've done several menus of this type before. If you want I can look at the code to see why IE doesn't like it.

i would like to use as little code as possible to make this work and am not willing to have multiple versions of any code except style sheets and some javascript.

You can do it with one stylesheet and one javscript file - the key is sniffing for different functionality in your javascript file (for example, IE has its own way of implementing event listeners and event handling).


For example, to find out where an event occured, this works in Mozilla and Opera:

node = e.target;

But in IE you have to use:

node = window.event.srcElement;

So if I need to know where in the document tree an event happened, I'll do this:

var node;
if(!e) //IE
        node = window.event.srcElement;
else{ //everything else
        node = e.target;
        while(node != null && node.tagName == null) //we want html elements only
                node = node.parentNode;
}

_________________________________________________________________
Get McAfee virus scanning and cleaning of incoming attachments. Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es



____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to