< back

Sam-I-Am's Builder Blog

Work type stuff - handy urls and notes on the trials and tribulations of a web builder.

Saturday, June 11, 2005

is the DOM ready yet?

This post ( Order of Events @ dean.edwards.name) addresses the need for a better solution than window.onload for DOM scripting. window.onload only fires after *all* the content on a page (including images) has loaded.. which is frequently significantly after the page has appeared in the browser. Mozilla/Firefox apparenly have the little known "DOMContentLoaded" event. Very handy. Windows IE has the readyState (or, better, the also little known ondocumentready event. Take this and brothercake's domFunction and there's a cross-browser solution in there awaiting the motivated developer.
< back

© Copyright 1999-2005 Sam Foster