Webskater
12-05-2003, 04:13 AM
I have a select box which is populated by a couple of functions depending on which button is clicked. So ButtonA causes ListA to be displayed and ButtonB displays ListB.
If the select box has the focus and is displaying (for example) List A i.e. it is in a dropped-down state and I click ButtonB to display ListB, it does not work. Clicking ButtonB causes the select box to stop displaying the list (i.e. it is no longer in a dropped-down state) but the function to change the list does not run. If you click the button again it does.
So, the function does not run when the select box is in a dropped-down state.
Can anyone tell me how to get over this? Is it possible to detect the state of a select box?
If the select box has the focus and is displaying (for example) List A i.e. it is in a dropped-down state and I click ButtonB to display ListB, it does not work. Clicking ButtonB causes the select box to stop displaying the list (i.e. it is no longer in a dropped-down state) but the function to change the list does not run. If you click the button again it does.
So, the function does not run when the select box is in a dropped-down state.
Can anyone tell me how to get over this? Is it possible to detect the state of a select box?