[Javascript] DOM vs AJAX

David Dorward david at dorward.me.uk
Tue Jun 20 03:33:41 CDT 2006


On Tue, Jun 20, 2006 at 10:21:28AM +0200, Michael Borchers wrote:
> when i discovered DOM i used it to dynamically create form elements.
> now i also use AJAX.

AJAX is a rather unhelpful buzzword and is best avoided.
 
> with DOM i'd have to really create every element,

Nothing stopping you writing routines (in JavaScript or elsewhere) to
reduce the amount of work involved here.

> but with AJAX i would simply store the elements in a seperate file
> and then import it into a <div>.

By "AJAX", do you mean "XMLRequest + innerHTML"?

> any disadvantages?

InnerHTML is non-standard, has an increased risk of broken markup, and
has support issues in some XHTML implementations.

-- 
David Dorward                                      http://dorward.me.uk




More information about the Javascript mailing list