[Javascript] Event Capture

Steve White steve at VirtualMechanics.com
Fri Mar 23 09:11:26 CST 2001


>     cmx = evt.getClientX();
>     cmy = evt.getClientY();
>Hmm...don't know these functions. Are they native to NN6?

They get the scroll position in IE4. They also seem to work in IE5. I don't
have NN6 installed at the moment so I cannot test them in that.

for NN I use
	sclx = window.pageXOffset;
	scly = window.pageYOffset;

Yours Truly

Steve White
www.VirtualMechanics.com

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Peter-Paul Koch
Sent: Friday, March 23, 2001 7:12 AM
To: javascript at LaTech.edu
Subject: Re: [Javascript] Event Capture




>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.


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list