Rob Gonda's Blog

DOM Builder: Less inhuman

So everyone that have met me, knows that JavaScript is less than pleasant :) but anything that we can do to make it suck less is welcome ... DOM is inhuman ... there's a reason why we write html pages using tags and not DOM ... but anyways, sometimes, especially when you're writing AJAX applications you may need to use some JS and DOM, and the DOM builder may come handy.


var html = DomBuilder.apply();

var form = html.FORM(
  html.DIV(
    html.INPUT({type : 'text', name : 'email'}),
    html.INPUT({type : 'text', name : 'password'}),
    html.INPUT({type : 'submit'}),
  )
);

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?D3ADE1F7-3048-7431-E4D95020FE880676

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
This blog is running version 5.9.003. Contact Blog Owner