posted 14 years ago
Hi,
I have to capture the keycode like 'esc (keycode=27)' enter(13) and down arrow key (40).
accordingly I have to show/hide a select box below a text field.
If I press down arrow key, the first item of the select box should be selected. For this i need correct keycode value.
I am using
var code = window.event.keyCode;
alert(code);
but for every key, it is giving value '0', due to which I am not able to proceed. This is not working in IE also, though i found on net that window.event.keyCode should work in IE.
Any suggestion ?
Thanks,
Manisha