Helping ordinary people create extraordinary websites!

Event Handlers and Callback Functions in JavaScript

By Sjoerd Visscher
2006-08-19

Introduction

In Higher Order Programming in Javascript I discussed the various ways of using functions as values. One particular trick in that document caught the attention of Dan Shappir, who pointed out to me: "your technique shows how JavaScript supported delegates all along, so this is not some great C#/.NET invention." While searching for some more information about these delegates, I found out that Microsoft has added them to Visual J++ too, invoking an interesting response from Sun, where it's discussed how delegates can much better be implemented with Inner Classes. As this is aparently a hot issue in other languages, and because event handlers and callbacks are useful in webpages too, I decided to write a new article to discuss this.




Tutorial pages:


This article is licensed under the Creative Commons


 2 Votes

You might also want to check these out:


Leave a Comment on "Event Handlers and Callback Functions in JavaScript"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS