Wednesday, August 01, 2007

Funky Firefox

I noticed some strange behavior in Firefox. If you do a standard HTML select box, and set one of the options programmatically to selected on the server side before the select box is rendered (say with ASP or PHP) Firefox sometimes will ignore your select. If you copy the output code and create a standard HTML file out of it, the proper select option will then be selected. Weird.

The workaround is to set the option to <option value="myval" selected="true">some text</option>

Strange. Hope this helps someone out.

[Update] use checked="checked" for radio buttons (same problem)

No comments: