[thelist] JS: createHTMLElement and onclick

ben morrison morrison.ben at gmail.com
Fri Jul 7 06:02:56 CDT 2006


On 7/5/06, VOLKAN ÖZÇELİK <volkan.ozcelik at gmail.com> wrote:
> Although there is nothing wrong in re-inventing the wheel. I think what you
> are trying to implement has been done to death in JQuery [1].
>
> Here is a simple example:
>
> var table =
>    $.TABLE({ Class:"MyTable" },
>       $.TBODY({},
>          $.TR({ Class:"MyTableRow" },
>             $.TD({ Class:"MyTableCol1" }, 'howdy' ),
>             $.TD({ Class:"MyTableCol2" },
>                'Link: ',
>                $.A({ Class:"MyLink", href:"http://www.example.com" },
>                   'example.com'
>                )
>             )
>          )
>       )
>    );
>
>
> [1] http://jquery.com/

That does look very good, although i'm trying to learn as much as I
can so am avoiding using javascript libraries as much as is possible.
Though I  am using prototype and scriptaculous due to its drag and
drop sortable lists as that is way beyond my current level of
knowledge.

Ben


More information about the thelist mailing list