Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    South East UK. 35 miles east of London, in sight of the River Thames.
    Posts
    297
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Use onSelect with Combo boxes

    Hi,

    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.

    Thanks

    Gary

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    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...

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    South East UK. 35 miles east of London, in sight of the River Thames.
    Posts
    297
    Thanks
    10
    Thanked 0 Times in 0 Posts
    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

    Gary


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •