how to get keycode value without passing event in JS for firefox?
<p>I have a JSP page which has an event onkeydown and calla a Ajax function ajaxFn(this), this function calls a series of functions and then comes to common function ajaxInteraction(response,ajaxObj).
In this common function there is a subfunction which determines the keycode value,</p>

<pre><code>ajaxObj.onkeydown = function(){

var keynum;
//  keynum = event.which;

if(window.event) // IE
{
    keynum = event.keyCode;
}
</code></pre>

<p>which recognises only the value from IE and does not recognises Mozilla.
I want to capture the keycode values in the same function for mozilla.
Am not able to capture the value using event.which since event is not passed here from JSP.</p>

<p>P.S: i cannot change the existing code.</p>
