Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

html:select event issue - I am not sure which event to use to remove focus

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

We have requirements that when user clicks combo box and then enter, it should submit request.

However, when we select combo box, control is with combobox hence, I have to move focus to next element. I have created java function for that. However, my problem is following lists of events available:

onblur
onchange
onclick
ondblclick
onfocus
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup

Out of above, only onchange event seems possible. However, when I use this event to move focus, there is another problem. If User use mouse to select value in combobox, it works fine. But still if user does not change value and hit ENTER, I have same problem.

Moreover, If some user use keyboard to scroll through value and try to select. It will move focus when he scroll one value.

I tried all combinations but failed so far. Moreover, I tried to search on internet without success. Any guidance or idea would be much appreciated.

Anybody who has face problem and any solution would be really useful.

Thanks,
Kapil Patel
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's something that would work:



I tried this on both Internet Explorer and FireFox, and it worked for both browsers.
[ March 08, 2007: Message edited by: Merrill Higginson ]
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic