reloading a form page with select-fields does not change the current "select option"

VERIFIED DUPLICATE of bug 46845

Status

()

Firefox
General
VERIFIED DUPLICATE of bug 46845
13 years ago
13 years ago

People

(Reporter: florian fruehstueck, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

when developing a form i often reload (ctrl-r) the pages with different
selections in a <select>-box. but the selected value is not displayed correctly.
when viewing the source code, the selection is correct, but not on the display
in firefox. 

Reproducible: Always
Steps to Reproduce:
1. open a form page
2. select a value from an option
3. change the source code of the form - select another option
4. reload the page via ctrl-r

Actual Results:  
the first selected value is still visible, although it is correct in the source code

Expected Results:  
it should have selected the new option

Comment 1

13 years ago
I am experiencing a similar problem. When using the <select> tag, I use
'selected ' in the <option> tag to mark previous choices on the form.
Unfortunately, this seems to be broken in Firefox 0.9. Works great in Mozilla
1.6 though.

Comment 2

13 years ago
As a web application developer, I have run into this problem alot!  I have
FireFox 1.0PR and this still occurs. Is there a setting to disable the "cached
entries"?

Comment 3

13 years ago
I've found that this error is due to improper use of HTML. The forms on a page
where I reproduced this error had improperly ended <option> tags or some other
error within the form itself. Not an error with Mozilla/Firefox. PEBKAC.

Though Mozilla's intuitive closing of the end tags may want to happen AFTER the
auto population.

Comment 4

13 years ago
Created attachment 159125 [details]
Simple Test Form

I have constructed a very simple form (using proper option end tags) to test
this.  Save this form, load it in the browser, then change the source to select
then 2nd value instead of the 3rd.  Then hit reload.  The values do not change.


Please let me know if there is a problem with the test form.

Comment 5

13 years ago
Yeah you won't be able to reproduce this with good code I don't think. I created
a large form with many option fields that was able to reproduce this error but I
realized that I didn't close some of my option fields higher on the page. Once I
did that, it remembered the values just fine and there was no error. 

I think this is a problem with precedence; my best guess would be that Mozilla's
'code completion' that takes care of sloppy HTML occurs after the population.
That is to say that the initial sloppy HTML is to blame and though Mozilla
corrects the HTML and fixes errors in the code, it occurs after the fact and as
a result, the SELECED fields are not showing

(In reply to comment #4)
> Created an attachment (id=159125)
> Simple Test Form
> 
> I have constructed a very simple form (using proper option end tags) to test
> this.  Save this form, load it in the browser, then change the source to select
> then 2nd value instead of the 3rd.  Then hit reload.  The values do not change.
> 
> 
> Please let me know if there is a problem with the test form.

(In reply to comment #4)
> Created an attachment (id=159125)
> Simple Test Form
> 
> I have constructed a very simple form (using proper option end tags) to test
> this.  Save this form, load it in the browser, then change the source to select
> then 2nd value instead of the 3rd.  Then hit reload.  The values do not change.
> 
> 
> Please let me know if there is a problem with the test form.

I have always thought this was by design. See bug 237945 comment 1. Apparently not.

*** This bug has been marked as a duplicate of 46845 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
Verifying old and obvious dupes. Sorry for bugspam.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.