Reputation: 10992
I have a textarea where I change some text and insert it with some javascript code, but it isn't showing up. I can see it through firebug, that it's there but on the screen I can't see anything. Any ideas?
Yeah, I don't think it's a problem in my js-code. It can be with some styling issues or something.
<textarea rows="4" cols="50" name="ta_eftertext" id="ta_eftertext">Bajskorv Aftertext hello world! </textarea>
Upvotes: 0
Views: 1955
Reputation: 6304
This should work:
html:
<textarea id="textArea">
</textarea>
and js:
$('#textArea').val('text');
Upvotes: 1
Reputation: 5157
You can use jQuery .text like this:
$('#ta_eftertext').text("foo");
http://jsfiddle.net/kannix/ZEjN7/
Upvotes: 0