Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    even.keyCode=9 tab event donsent work in FireFox

    I am having trouble in calling tab event using my own function.
    i call tab event using
    event.keyCode = 9;
    but firefox gives this error "Error: event is not defined".

    What to do? plz help.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    You have to pass the event object to the function. That's the cross-browser way to do it.
    Code:
    function fKeydown(evt){
      alert(evt.keyCode);
    }
    Code:
    <input type="text" onkeydown="fKeydown(event)" />


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •