Home & blog  /  2010  /  May  /  view post  /

Domscripter - reduce your DOM-scripting code

posted: 28 May '10 13:00 tags: Javascript, DOM-scripting, form

Urgh - is it me or does native DOM-scripting require a lot of lines of code? Imagine creating a link and giving it a class and an href; that's one line to create the element, one to give it a text node, two more to apply the href and and class and one more to append it.

Hence I wrote domscripter, a powerful tool for creating HTML elements en-masse. In one function call you stipulate the element you want to create, where it should live in the DOM, what properties it should have, what assistance elements should be created at the same time (e.g. a label for a form field), and more.

Head over here to download, get usage info or view a demo.

post new comment

Comments (1)

seo company, at 11/07/'11 09:06, said:
Nice post