[Javascript] Event Capture

Peter-Paul Koch gassinaumasis at hotmail.com
Fri Mar 23 06:11:56 CST 2001


>Similar problem to my other posts. I need to capture events for different
>Browsers. To capture a mouse move for example, can I use this method for 
>all
>3 Browser formats? How do I capture the scroll position for NN6/IE5 ?
>
><BODY onmousemove="mouseMove(evt)">

Does not work in Netscape. NN4 doesn't recognize a mouseMove in the BODY tag 
anyway and NN6 can't access the event object.

Instead, simply do

document.onmousemove = "MouseMove";
if (document.layers) document.captureEvents(Event.MOUSEMOVE);

This works fine.

>     cmx = evt.getClientX();
>     cmy = evt.getClientY();

Hmm...don't know these functions. Are they native to NN6?

ppk

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the Javascript mailing list