Quote:
Originally posted by Vlad902 What you need is a JS event that runs in real time (check out my timers NUM) to check if a value has been chosen and if so make the window.location different as appropriate. |
using a timer to keep checking if something changed is known as 'polling'. polling is often bad. in this case it keeps the javascript interpreter running, for no real reason, after the page has been rendered (it could be 3 days until the user actually selects something). instead, javascript provides asynchronous events (in this case,
OnChange) so that your browser doesn't have to consume processor time while waiting for something to happen.
here are a few great examples:
http://www.tneoh.zoneit.com/javascript/listboxlink.html
yes, i am aware that the cpu time consumed in this instance is trivial, but it's bad practice anyway.