File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Event parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Event parameter" Watch "Event parameter" New topic
Author

Event parameter

Sen George
Ranch Hand

Joined: Sep 21, 2005
Posts: 76
The following code works but with one error. Error is that the argument "ev" is undefined. Please advise.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

IE does not follow the W3C standards for event handling. It makes the Event instance available at window.event instead of passing it to the listener.

So you could add code to the listener such as:to deal with this egregious behavior.

Also be aware that IE also populates the Event instance with non-standard properties. So you need to deal with that too!

Or (highly recommended!) use a library like jQuery for your event handling which hides these (and other) browser differences.

P.S. "ev"? What's wrong with "event"? Much more readable.
[ November 02, 2008: Message edited by: Bear Bibeault ]

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Sen George
Ranch Hand

Joined: Sep 21, 2005
Posts: 76
Thank you for the clarification.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Event parameter
 
Similar Threads
How to escape % in JSP
Is there something better then event.pageX/Y?
position of HTML columns in pixels?
site development
Browser coords in FF not working but working in IE