I am using the following code to get the keycode value from the Javascript 

```
   var whichCode = (window.event) ? e.which : e.keyCode;

```

However, it is working fine except IE 9. It is returning undefined on the e.which.