Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

capture down arrow from inside select list . 1

Status
Not open for further replies.

niblet

Programmer
Aug 7, 2001
30
US
Hi,

I am using the onkeypress event in a select list and have no problem catching keys from in main keyboard, however, I would like to capture the down arrow, but I don't seem to be able to do that with the onkeypress.

My goal is, as a list is scrolled, I would like to display using window.createPopup() more detailed information about the current item in the list. When I use the onkeypress I am able to do it, providing i press within the main keyboard, but since people are gonna scroll using the down arrow, I need to catch that key press. As a test I just did onkeypress="alert(event.keyCode)" just to see if I can read the key, the alert does not occur on the down arrow press.


Does anyone know if this is possible ..

thanks
niblet
 
niblet,

use onkeydown. on my winNT ie5.5 machine, they translate to:

L=37
U=38
R=39
D=40

=========================================================
if (!succeed) try();
-jeff
 

Jeff,

that was it exactly ... One thing to note, in order for the list to scroll I needed to advance the index in the drop down list in my evalKey() function, and I had to also force the tab advance to the next field.

But I got my wish, I can pop out my windows on a the up/down scroll ... so thanks so much.

niblet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top