Closed Bug 486652 Opened 17 years ago Closed 15 years ago

After refresh (F5) selected attribute of <option> not properly evaluated.

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: andy, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-11-01])

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 After refresh (F5) selected attribute of <option> not properly evaluated. Note, proper behaviour after Control-F5, and on initial load of page. Consider the following, copied from Firebug display: <select name="ds" onchange="doSet(this,1)"> <script> </script> <option value="0">building1</option> <option value="1" selected="">building2</option> <option value="2">building3</option> <option value="3">building4</option> <option value="4">building5</option> <option value="5">building6</option> <option value="6">building7</option> <option value="7">building8</option> </select> On initial load display shows "building2" --- correct On F5 refresh: "building1" --- incorrect On Ctrl-F5: "building2" --- correct Code that writes the select options: function writeOpts(sel) { for (i=0;i<datanames.length;i++) { if (i != sel) { opt = "<option value='" + i + "'>" + datanames[i] + "</option>" ; document.write(opt) } else { opt = "<option selected value='" + i + "'>" + datanames[i] + "</option>" ; document.write(opt) } } } Other browsers tested: Opera -- All good Safari -- All good Chrome -- All good IE -- All Good Reproducible: Always Steps to Reproduce: 1. JS writes select with options, option other than first has 'selected' attribute 2. Load page -- see all is good 3. Use F5 -- see that first option is pre-selected in error 4. Use Crtl-F5 -- see that correct option is pre-selected Actual Results: AS above Expected Results: Always show option wirh selected attribute Checked: http://www.w3.org/TR/html401/interact/forms.html which just shows the selected attribute present. The fault also occurs when the JS writes selected='true'
This is a mass search for bugs which are in the Firefox General component, are UNCO, have not been changed for 500 days and have an unspecified version. Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.