You can insert it, and it will be instantiated into the element you
desire, assuming that it is valid HTML after it's been evaluated, and
you're inserting it into a spot in the DOM where that makes sense. For
example, a TR inside a TBODY or THEAD, a SPAN inside a P...
If you want to make an Element and do things with it either before or
without inserting it into the visible page, you can use the new
Element(tag,{attributes}) syntax to do that. Added benefit that you
have a full element, you can attach listeners to it, etc, without
needing to insert it in the page or make it visible.
Walter
On Apr 28, 2011, at 7:42 PM, kstubs wrote:
Template evaluate returns a string. What is the best way to go from
string to Element?
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
.
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.