Sorry if this should be in HTML, but I think it may be a PHP problem. For some reason when I generate dynamic option listings "<option value="x" selected>" does not work. By "not work" I mean that the combo box does not select that option by default on the form. It does work in IE6 but not FF.
Here is the output from my code
<select name='name'><option value='1'>xxx</option>
<option value='3' selected>ccc</option>
The above code does work in Firefox. 'ccc' is selected by default.
If you made your own selection, refreshing/going back will keep the selection you made (just like what you typed into text inputs is still typed when you go back).
Clear your cache, close your browser, go back to your test page and you should see that 'ccc' is selected.
<option value="x" selected="selected">nnn</option>
Firefox is perfectly capable of interpreting HTML 4, where "selected" alone indicates the selected option.
I would like to suggest u to TRY what "php_daemon" is suggesting as i faced same problem i solve it by putting selected='selected'.
Right on. slaps forehead
This topic is now closed. New replies are no longer allowed.