Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Capture KeyPress event in javascript for FireFox
posted

I am trying to capture the keyCode on the KeyPress Event client side.
If I use

function IgnoreEnter(keyCode) {
    if (event.keyCode == 13) {
        event.returnValue = false
        event.cancel = true
        return true
    }
    else {
        return false
    }
}

it is not capturing the keycode event.  I need to pass the event, which I am not sure how to do that. 
Using <ClientSideEvents KeyPress="IgnoreEnter"  KeyDown= "IgnoreEnter"/> does not capture the event in Firefox.  How do I capture the event?

Thanks.

 

Parents Reply Children
No Data