Interesting question: Does a form SELECT have an equivalent to a form INPUT type="text" defaultValue?
For example: if an input field has a value of "Click Here" when a form first loads, and is set to become "" (blank) when focus is put on it, you can have JavaScript set the value to defaultValue ("Click Here") upon blur if nothing was typed.
Is there an equivalent for a SELECT option? If a different option is selected, can you compare that new option selectedIndex value to the original option selectedIndex value that was when the form first loads?
I was trying to get fancy-shmancy with some validation.
Basically, there is a select that contains an initial option (value 0, display "All Reports") and that is followed by a db query of (value employee ids, display employee name) so a supervisor can view an individual's record. I just wanted to keep the submit button disabled until a different option is selected. That's why I wanted to compare current selectedIndex against original selectedIndex (when form first loads.)
Sadly, that function was causing some conflict with something else, so just a few minutes ago it was scrapped. I was just on my way here to cancel the request.
Bookmarks