Closed Bug 317330 Opened 19 years ago Closed 19 years ago

innerText= ''; does not remove content

Categories

(Firefox :: General, defect)

1.5.0.x Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 264412

People

(Reporter: andre.romcke, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 htmlcode: <div id="box"> <small> If nothing has happend whitin the time you have read the end of this text,<br /> you either have a dead slow computer or have turned of JavaScript in your browser !<br /> In that case logout and login using the legacy / frame mode! </small> </div> javascriptcode (called true an event): document.getElementById("box")mydiv.innerText = ''; This code does not clear the content og the div. To be able to do that you'll have to use the somewhat slower innerHtml instead. Reproducible: Always Steps to Reproduce: 1.test above code 2. 3. Actual Results: nothing happens in firefox / mozilla. Expected Results: reomove the div's content like Ie and Opera does reomove the div's content like Ie and Opera does
Version: unspecified → 1.5 Branch
innerText is an IE invention. In Firefox/Mozilla/dom level 2 compliant browser, you can use textContent instead.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 254174 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** This bug has been marked as a duplicate of 264412 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.