Register the event on the document property as it represent the page
itself.

On Mar 25, 8:14 pm, dl <dave.lemanow...@gmail.com> wrote:
> This code seems to work in firefox and chrome but doesn't work in IE.
> It uses prototype's Event.observe to respond to a click anywhere in
> the window with an alert message.
>
> Anyone know how to make it work for IE (and the other browsers)?
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" >
> <head>
> <title>Click Test</title>
> <script type="text/javascript" src="prototype.js"></script>
> <script type="text/javascript">
>   Event.observe(window, 'click', function() {alert("clickety!");});
> </script>
> </head>
> <body>
> <h1>Click Test</h1>
> </body>
> </html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to