Microsoft
Software
Hardware
Network
Question : Javascript error in Chrome when setting innerHTML or innerText
I need to set the text on a hidden asp:textBox in javascript. The Script works fine in FF and IE but fails in Chrome. Does anyone know how to correct or work around this issue? The attached HTML when run in Chrome will give the error. Thanks
chromeError.htm
(605 bytes)
(File Type Details)
HTML to produce error
Answer : Javascript error in Chrome when setting innerHTML or innerText
You need no innerHTML, innerText.
The correct attribute name is: value
Like this:
<script language=javascript>
function loadText(txt) {
try {
var el = document.getElementById("T
ext1");
el.value = txt;
}
catch (err) {
alert(err);
}
}
</script>
Random Solutions
DELETE DUPLICATE RECORD from TABLE in SQL Server 2005
Is it ok to plug a simple power strip into a UPS
Problem: Website SSL/TLS issue causing "Internet Explorer cannot display the webpage." to be displayed.
FreeNAS NIC teaming
SCCM Software Report By Major Revision
How do I combine two separate powerpoint template files into one?
Setting Up Exchange Email on Apple IPAD
Previous Month-end Date based on Date in Text Box
Wireless Access Point - Hard Plastics Protective Cover
Required Field Validator for 2 controls