Closed Bug 433301 Opened 18 years ago Closed 18 years ago

selecting options does not update innerHTML

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 159282

People

(Reporter: bugrep109, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 When you change the selected option in a <select> region and then add to the elements innerHTML, the selected option reverts to the original value. Reproducible: Always Steps to Reproduce: With the test code in "Additional information" in this bug report: 1. Change selected option from "1" to "2" 2. Click on the "change content" link Actual Results: Selected option reverts to "1". Expected Results: Selected option retains "2". <div id="c"> <select><option>1</option><option>2</option></select> </div> <hr /> <div> <a href="#" onclick="readContent()">read content</a><br /> <a href="#" onclick="changeContent()">change content</a><br /> <script type="text/javascript"> function readContent() { alert(document.getElementById('c').innerHTML); } function changeContent() { document.getElementById('c').innerHTML += "new content"; } </script>
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.