Possible Duplicate:
$(document).ready equivalent without jQuery
I know you can use the window.onload event to make functions run, but is there a way for a script to query if the document is ready or not?
Something like
function update() { if( !document.ready() ) // don't do unless document loaded return ; } window.setInterval( 'update();', 100 ) ; Cannot change the <body> element, and no jQuery/other libraries.