Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2002
    Thanked 0 Times in 0 Posts

    onkey event and on change with dropdown menu

    i have a dropdown menu that submits a form object when the onchange event is triggered. however, i noticed that the onchange event is only triggered when users use the mouse to change the selection.

    my question is what javascript on-<blank> event should i use if users, use the tab key and the arrowkeys to select an option in the dropdown menu?

    for example, the dropdown menu contains a list of countries and instead of using the mouse to select a country, i use the up and down arrowkeys. how do i catch that event? onchange doesn't seem to catch it.
    Last edited by shibby1011ph; 01-24-2005 at 09:44 AM.

  • #2
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Bucharest, ROMANIA
    Thanked 379 Times in 375 Posts
    Probably the best way is do double the onchange event with a normal submit button. Thus, those who might have used the arrows (or those which might have javascript disabled) could submit as well
    Offshore programming


    Posting Permissions

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