Sorry Jeremy, I'll try to remember that. Thanks for your help!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeremy
Kitchen
Sent: Wednesday, March 15, 2006 4:12 PM
To: rails-spinoffs@lists.rubyonrails.org
Subject: Re: [Rails-spinoffs] Adding Elements into the DOM

when starting a new thread, please do not reply to an existing post, remove 
all of the content including the subject, and type out your new request.  
Messages posted this way break the list archives and mail clients that 
support threading.  Instead, please use your MUA's 'new' function.

That being said:

On Wednesday 15 March 2006 14:05, Daniel Elmore wrote:
> Hi, what is the best practice for adding elements into the DOM. InnerHTML?
> Does prototype provide a better or enhanced way?

it depends on how you're attempting to add them.  If you're taking the 
responseText from an XHR call and want to throw that into the DOM, then I'd 
recommend using innerHTML.  If you're trying to build some elements from 
scratch using javascript, I'd use the DOM manipulation methods provided by 
javascript.  Scriptaculous also includes a neat feature called the 'builder'

which I believe aids in creating complex DOM trees.

-Jeremy

-- 
Jeremy Kitchen ++ [EMAIL PROTECTED]

In the beginning was The Word and The Word was Content-type: text/plain
  -- The Word of Bob.

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to