Thursday, April 27, 2006

What's wrong with innerHTML? -

What's wrong with innerHTML? - "What's wrong with innerHTML?
April 13, 2006 | JavaScript

I know Jeremy Keith's position on this but I still don't understand why him and others are so against innerHTML. Sure it's not part of a standard (yet) but neither is the XMLHttpRequest object (yet)."

More on the innerHTML issue.

I had to assist somone with some javascript for the first time in a while today, and I had to use several DOM methods to get to the correct element on the page. (HTML source did not contain any id's and we could not edit it), after using DOM methods to get to the correct element - it made sense to use them to set the data too - it is particularly useful as they are more powerful - you can use them to get access to data that already exists and then append to it.

No comments: