1 |
In Netscape, the event is passed as an argument to the handler as in WW_processclick(e)
|
2 |
While in Microsoft IE, event properties are stored in a single window property window.event
|
3 |
So in WW_eventx(e), the argument is ignored in IE
|
4 |
function WW_eventx(e) { // return x value of event
|
5 |
if(WW_Netscape4 ) {
|
6 |
return e.pageX; } // Netscape
|
7 |
else { return window.event.clientX; } // Microsoft
|
8 |
} // End WW_eventx(e)
|
9 |
Also there is meant to be a different event handling model in browsers
-
In Microsoft IE, events are bubbled up through the containing objects until document is finally reached
-
In Netscape4, events are first processed by window and then passed down through container hierarchy. return false stops this sequence
-
For both browsers, if you put return false in WW_processclick(e), then clicking on link will NOT load new page
|