Closed Bug 254174 Opened 21 years ago Closed 19 years ago

textarea innerText returns undefined in javascript

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 264412

People

(Reporter: anita.kessler, Assigned: bugzilla)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 <form> <textarea>123</textarea> <input type=button onClick="alert(document.forms[0].elements[0].innerText)"> </form> This example returns undefined instead of '123'. Workaround: Usage of document.forms[0].elements[0].value instead of .innerText works well. Reproducible: Always Steps to Reproduce: 1. Use FireFox 0.9.2 2. Use example at "Details" Is .innerText not supported at all with a textarea?
.innerText is an IE only dom property. You should be able to use the w3c dom property .textContent instead.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Alias: innertext
Status: RESOLVED → VERIFIED
*** Bug 262946 has been marked as a duplicate of this bug. ***
*** Bug 287395 has been marked as a duplicate of this bug. ***
*** Bug 317330 has been marked as a duplicate of this bug. ***
*** Bug 339017 has been marked as a duplicate of this bug. ***
Alias: innertext
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 264412 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.