This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes bindAsEventListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "bindAsEventListener" Watch "bindAsEventListener" New topic


Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

I have the following snipit:

I'd like the user to be able to define their own even handlers for onmouseout, etc, and be able to bind user defined events, rather than having to have them change the code in the above snipit. Is that possible? Someway for the user to pass in the event in the initialize: function() ?


GenRocket - Experts at Building Test Data
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You probably want to look into new Function() or call(). If you look at the ContentLoader from my book or look at prototype or dojo, they use call.

Have you checked out Aspose?
subject: bindAsEventListener
It's not a secret anymore!