The wonders of functions

JavaScript is a funny language. This causes a “not implemented” error in Internet Explorer…

window.onload = document.forms.f.q.focus();

But this works fine…

window.onload = function(){
document.forms.f.q.focus();
}

Hmmm.

Metadata

This entry was posted on Saturday, June 24th, 2006 at 2:50 pm and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply