For some odd reason, event.clientX and event.clientY don't work in safari in mac os x leopard. They used to, but it appears it cannot find the object "event".


In the file windowsxp.js (don't get confused with windowsxp.jos), the movecursor() function moves the cursor div. It works, but the event.clientX issue seems to be messing the entire function up. Why is this happening? Anything in my page that is messing it up? (notice: the url I've given will open a "launcher" webapp, and you must click on "windowsxp.jos" to load external files and see the problem)

I must be tired, and I can't explain this issue really good.

Thanks in advance, Ben.

TypeError: Result of expression 'event' [undefined] is not an object.

9 Years
Discussion Span
Last Post by sawmaster

clientX and clientY is supported wel in IE mode browser's. You can use screenY and screenX in safari.



clientX and y doesn't appear to be incompatible. It appears that the entire event object is not working in safari. I just did this test in my url box right now in safari 4 and it works:

javascript:document.onmousemove=moveitlol;function moveitlol(){document.body.innerHTML=event.clientX;}

Is there any kind of error in http://71.193.1122.221:8888/tools/jos2/windowsxp.js that is causing the event object to not work?

Thanks in advance.

EDIT: I tried javascript:document.onmousemove=moveitlol;function moveitlol(){document.body.innerHTML=event.clientX;} in and it didn't work. It only works if I don't load windowsxp.jos. javascript:document.onmousemove=moveitlol;function moveitlol(){document.body.innerHTML=event.clientX;} works everywhere else though.


For those needing refrence URLs, use this instead.
(Sorry if you refer to this as spam, as I can't edit those posts above)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.