client side ?

G

Guest

hey all,

i'm using the javascript event "onkeypress" and was wondering when this
event runs if i can determine what key was pressed (specifically if the down
arrow key was pressed.)?

thanks,
rodchar
 
G

Guest

The OnKeyPress would not capture the down arrow or up arrow.

Use the OnKeyUp or onKeyDown events instead:

function fnKeyUp()
{
alert(event.keyCode); //would display 38 for uparrow and 40 for downarrow.
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top