Link to home
Start Free TrialLog in
Avatar of tbaseflug
tbaseflugFlag for United States of America

asked on

Select - Move selection to first non-disabled option

I have a select - where some of the first few options may be disabled - is there a way - on load of teh select, etc. - to move the default selected option to the first non-disabled option?
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tbaseflug

ASKER

I am lucky/unlucky in that my requirement is IE - the above code is failing on the line #5 -

Webpage error details
Message: 'option' is null or not an object
Line: 315
Char: 21
Code: 0

1 typo, 1 miss

      sel.options[i].selected=true;

Open in new window

A coding error michel?  ;^)
Perfect!  Thanks!!!!
Yep - I do have those, C&d