PhpRiot
Download This Article
Download this article or the entire “Eight Weeks of Prototype” series with all listings and files.




More information
Related Books
JavaScript: The Good Parts

JavaScript: The Good Parts

Most programming languages contain good and bad parts, but JavaScript has more than its share of...

Prototype and script.aculo.us: You Never Knew JavaScript Could Do This! (Pragmatic Programmers)

Prototype and script.aculo.us: You Never Knew JavaScript Could Do This! (Pragmatic Programmers)

Tired of getting swamped in the nitty-gritty of cross-browser, Web 2.0-grade JavaScript? Get back...
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (28), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

PhpRiot Newsletter
Your Email Address:

Comments

Article Comments (1 total)

Pablo Impallari, 24 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.

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


Tagged in ,