Your first 3 minutes are FREE talking live with me.
Please visit my website at: http://www.keen.com/Ask+Fran
Or, call me right now at: 1-800-275-5336 x0160
--
You received this message because you are subscribed to the Google Groups "Website Design Nz" group.
To unsubscribe from this group and stop receiving emails from it, send an email to website-design-nz+unsubscribe@googlegroups.com.
To post to this group, send email to website-design-nz@googlegroups.com.
Visit this group at http://groups.google.com/group/website-design-nz.
For more options, visit https://groups.google.com/d/optout.
Re: text in textarea disappears
The contents of textarea tag is stored in the value attribute, not the innerHTML, as many seem to think. textcontent (which should be spelled textContent) changes innerHTML, not value.
On Tuesday, March 4, 2014 4:12:24 PM UTC-5, An Mertens wrote:
-- Use:
code.value = "test";
On Tuesday, March 4, 2014 4:12:24 PM UTC-5, An Mertens wrote:
A javascript application puts a message in a textarea of an html page. After the message has been put in the textarea, the message immediately disapears.code in javascript application:xhr.onreadystatechange=function(){ if (4===xhr.readystate){var code = document.querySelector("textarea") code.textcontent="test"}}xhr.send()code in the html file:<textarea name="textarea" id="textarea" width="1000" style="width:1000px" autocomplete="on"></textarea>Output in the textareatestBut the text "test" immediately disappears.
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
text in textarea disappears
A javascript application puts a message in a textarea of an html page. After the message has been put in the textarea, the message immediately disapears.
-- code in javascript application:
xhr.onreadystatechange=function(){
if (4===xhr.readystate){
var code = document.querySelector("textarea")
code.textcontent="test"
}
}
xhr.send()
code in the html file:
<textarea name="textarea" id="textarea" width="1000" style="width:1000px" autocomplete="on"></textarea>
Output in the textarea
test
But the text "test" immediately disappears.
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Posts (Atom)