Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Eight Weeks of Prototype: Week 4, Event Handling in Prototype

Article Comments (4 total)

John Lee, 23 January 2009
Hey, just wanted to say that this series is wonderful... I'm new to Prototype and had a great time reading and understanding your tutorial. Thanks and keep up the great work.

romu31, 28 May 2008
awesome tutoriel . I readed only the 4th lesson .Just a point ( may be u have mentioned it) : the script in the page , in weeks 4 , could mention the onload via "Event.observe(window, 'load', function() { romuLoad() });". anyway , it's the best tuto i read on prototype so far . good work

Pablo Impallari, 25 May 2008

Instead of using: Event.observe(window, 'load', function() { ... your code ... }); You should use: document.observe("dom:loaded", function() { ... your code ... });

Response from PhpRiot:

Thanks Pablo. I did in fact discover this after publishing the first 5 articles (it's not actually clearly documented, just buried in the code). For the sake of consistency I continued to use the window load event but may update all the articles in the future accordingly.

patrov Dimitri, 13 May 2008
What about event-handling on an ajax page?
Submit a Comment
Use the following form to submit a comment for this article. You can include any required code snippets, which we will format and highlight accordingly.

Note: Before your comment appears on PhpRiot, it must be manually approved. The email address field is optional. If you choose to include it, it will be displayed obfuscated to protect it from spammers.

In This Article