Short answer: IE doesn't look for the mousemove event on the window
object. Use document instead.
(There might be a patch here if the devs think it's important--
Event.observe already catches 'keypress' in Safari, and converts it
to 'keydown')
TAG
====================================
Proof:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript">
function watch(e) {
$('debug').update(
'[ X: ' + Event.pointerX(e) + ' / Y: ' + Event.pointerY(e) +'
]\n'
);
}
window.onload = function () {
$('debug').update('Loading ...');
Event.observe(window, 'mousemove', watch); // Change window w/ document
//window.onmousemove = watch;
$('debug').update('Loaded.');
}
</script>
</head>
<body>
<pre id="debug">(empty)</pre>
</body>
</html>
On Jun 19, 2007, at 2:18 PM, RighteousRaven wrote:
>> It's a bit hard to help without a complete, minimal code sample (and
>> the specific, unhelpful IE error message).
>
> That's part of what is weird... there is no error message. The
> observed function just isnt getting called in IE.... but its perfect
> in FF.
>
>
>> 1. Check to make sure you don't have a trailing comma after the last
>> element your curly braces. (Common problem)
>
> Not it...
>
>> 2. Because you posted an edited sample.... are you sure the observe()
>> is being called *after* pMenu is defined?
>
> observe() is being called within pMenu.show(), with the mousemove
> event calling pMenu.watching(). I tried rearranging the order of the
> definitions of show and watching, but to no avail.
>
> I had thought that Event.observe was supposed to be cross browser, and
> without an error message I feel super-lost.
>
> RR
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---