Saturday, July 17, 2004

In javascript, do not use 'document.all'!! Use 'document.getElementById' instead..

Here is a little something i got from Simon Willison's weblog.
document.getElementById is supported by every javascript supporting browser released since 1998, whereas, document.all was introduced in IE4, because the W3C DOM hadn't yet standardized a way of grabbing reference to elements using their ID. By the time ID5 came out, document.getElementById() had beed standardized and as a result, IE5 included support for it!

Well.. you live, you learn....

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

© Copyright 2005, Rohan Thomas
Disclaimer
This Blog contains findings that are self-explored and expressions that are self-evoked. They are by no meanss representions of my employer's view.