Friday, January 25, 2008

Firefox TextArea Weird behaviour

I have this very weird behaviour with Firefox TextArea.

I was having the HTML like this:

And I'm doing this eventually in the javascript upon click of a button:
document.getElementById("txtStatus").innerHTML += "SomeResult"

Well, it works perfectly until you change the content of the TextArea manually, subsequent click on the button will "change" the innerHTML property but the display won't refresh and show you the changes.

I don't know what went wrong, but I got it kind of solved by using .value instead of .innerHTML, which it might be due to the design of innerHTML rather than specifically to TextArea.


No comments: