There is support for this in different browsers, but it's not standard.  In
Firefox, you could say:

  Builder.dump();
  function outputElement(e) {
    return new XMLSerializer().serializeToString(e);
  }
  document.write(outputElement(TABLE({id: 'mytable'}, [
    TR([
      TD('cell 1'),
      TD('cell 2'),
      TD('cell 3')
    ])
  ])));

Still have to use document.write(), but you could build up the element
programmatically.

I agree with @blechler though, this really isn't the recommended approach
for doing dynamic HTML development.

-Fred

On Fri, Jun 13, 2008 at 9:26 AM, AlannY <[EMAIL PROTECTED]> wrote:

>
>
> But, I don't want to specify an ID, I want just to <write> elements ;-
> (
>
> As I can see - it's impossible! Am I right?


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to