I'm populating a dijit select widget with options whenever another select widget's value changes.
In my app, theres a dropdown menu for "Bus Route" and a dropdown menu for "Bus Stop". Users have assigned bus routes and stops that should be updateable.
So when the page first loads, the route dropdown box has all routes available, and the route you are currently assigned to is the selected value. The stop menu is loaded with all stops associated with that route, but there is no selected value, so, as by default, it's the first option.
Whenever the user changes the currently selected route, the stop menu changes accordingly and is populated with all stops associated with that route.
My question is, with dojo, how can I set the "Selected" option in the stop menu?
I want it to be clear which stop is currently assigned to that user, instead of the "selected" stop being the first option in the route.
Thanks.