Friday, 19 March 2010

When Firefox shows SELECTED values that are different from those shown in the Source

Another quirk that cost me hours:

Firefox can be "two-faced" in the way it handles SELECT (or Combo) boxes if you have errors on your page.

Try View Selection Source (or use Web Developers' View Source or Inspect Element) and the code looks perfect. And the boxes lay out nicely and show the right list of options. BUT look at which items are ACTUALLY selected, and they aren't the same ones that show with selected="selected" in the source.

Fix the errors elsewhere on the page and all works as you would expect!

No comments: