FF and Chrome are a lot more lenient - if they are asked for an option value and there isn't one they will use the option text as a fallback, but this is one of the few instances where I think that IE is doing the right thing
...but this is one of the few instances where I think that IE is doing the right thing
For me, those instances are rare, indeed. But I agree with you.. options should be forced to have both value and text.
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
When an <option> without a value= is selected and the <form> is sent to server-side processing, indeed *ALL* browsers (by specification) then instead send the text of that <option>.
So, from the server-side view of things, in the absence of a value, the text is the value.
Still, it does seem a violation of the tradition of the DOM.
Here's an interesting tidbit: Originally, the *ONLY* browser that allowed you to use formreference.selectName.value was MSIE! Netscape *INSISTED* that you must use form.select[form.select.selectedIndex].value Again, in the original spirit of the DOM, I think Netscape was right. But MSIE prevailed and now all browsers support form.select.value and now we have the ironic situation that all except MSIE have taken the DOM-enhancement one step further.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
I quite like formreference.selectName.value - I don't really mind about violating the spirit of the DOM or whatever. It seems to me that a select having a raw value is in keeping with other form elements (even though I know that it's not actually the select tag that holds the value but the option tag, but then the select tag is *never* going to have a value, so there is no ambiguity for me).
But then I like to live on the edge. I personally look forward to the day when we can do formreference.selectName.text