I'm so confused...

Walter

On Mar 17, 2009, at 10:00 PM, Tobie Langel wrote:

>
> OK, so to summarize:
>
> 1) TextArea have a value property (as per DOM 2 specs),
> 2) Prototype Element#setValue uses the value property (not the HTML
> value attribute),
> 3) Proper, standard compliant way of doing what OP wants:
>
>    textArea.value = content.unescapeHTML();
>
> 4) Prototype way of doing it:
>
>    $(textArea).setValue(content.unescapeHTML());
>
> It's a bit slower (obviously) but you benefit from using a consistant
> API for all form elements.
>
> 5) Possible non-standard shortcut suggest by Rob (Note that setting
> innerHTML on textarea elements is NOT trustable across browsers[1]. I
> do NOT recommend it):
>
>    textArea.innerHTML = content;
>
> Best,
>
> Tobie
>
> [1] Safari and IE won't update the textarea if the added content
> contains HTML tags, whitespace is not respected in IE at all,  etc.
> see notably: http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
>
> >


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to