On Nov 3, 11:43 pm, simon <[EMAIL PROTECTED]> wrote:
> RobG schrieb:
[...]
> > If you are moving an existing element and all its children, all you
> > need to do is attach it to its new location in the DOM using
> > appendChild.
>
> ok. thanks for the hint. will have a look at it and try it out.> Using 
> innerHTML to get the string, then parse it back into the DOM
> > using innerHTML again is just plain silly.
>
> i actually don't use innerHTML to write it back, i use Element.update(...).

Element.update uses it, otherwise it would have to parse the HTML
itself (which would be a bit silly if the innerHTML property is
available).


> > There is no standard for
> > innerHTML and it is implemented differently in different browsers, you
> > will likely encounter quirks if you persist with that strategy.
>
> it's just a really small script and i tested it in all major browser and
> it works fine so far.
> but anyway thanks very much for your comment.

Incompatibilities can arise in even trivial scripts - try the example
below in IE and Firefox.  Change the text in the input and note the
value attribute reported by innerHTML.

<div id="a"">
 <input type="text" value="original value">
 <button onclick="alert($('a').innerHTML);">Show div innerHTML</
button>
</div>

--
Rob


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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