View Full Version : Use onSelect with Combo boxes

Gary Williams
04-10-2003, 12:01 AM

I'm using a combo box where some entries call popup windows. At present, I have to use onChange to trigger the event. There are times when a popup window needs to be recalled. As this isn't a 'change' the popup isn't called.

How can I use onSelect instead, or a workaround.



04-10-2003, 11:03 AM
If I understand you - you select a value, a window pops up, and that value stays selected, forcing you to select another value before selecting the first one again to get the popup window to reappear - how about this:

Add a line to whatever function you call onChange (and AFAIK thats the only really useful event handler you can use with combo boxes) so it opens the window and then resets the combo box's selectedIndex property to 0. Haven't tried it but I don't see why it shouldn't work... :)

Gary Williams
04-13-2003, 09:09 AM
Hi Spudhead,

I agree, that approach should work. Trouble is, I also need to keep the value of the selectedIndex. I've solved the problem by switching to radio buttons.

Thanks for your advice