DOM vs. innerHTML; was: [Javascript] DOM vs AJAX

Scott Reynen scott at randomchaos.com
Tue Jun 20 09:51:05 CDT 2006


On Jun 20, 2006, at 5:10 AM, Rakesh Pai wrote:

> The DOM and Ajax have nothing to do with each other. One is to create
> dynamic form elements using browser API, the other is to download bits
> of data from the server.

On Jun 20, 2006, at 8:48 AM, Michael Borchers wrote:

> one way would be doing it by DOM, the other could be an AJAX / XML  
> request,

Wrong.  See above.  DOM and AJAX don't do the same thing.  They are  
*not* alternatives.  Your alternatives for inserting content are DOM  
vs. innerHTML.  Your alternatives for getting content are AJAX vs.  
pre-filled JavaScript variables vs. (hidden) HTML.

Peace,
Scott




More information about the Javascript mailing list