netscape + enter key problem

Discussion in 'ASP .Net' started by Stephen, Aug 20, 2004.

  1. Stephen

    Stephen Guest

    Hi,

    The problem is like this, I have a textbox and a button, I wanted to disable
    the enter key, so as to prevent the user from hitting the enter and seeing
    undesirable results. I used this function
    function disableEnterKey()
    {
    if (window.event.keyCode == 13) window.event.keyCode = 0;
    }

    the disable key works perfectly in IE
    but only in some instance of Netscape,
    for eg: when the page loads and the user hits the enter key, nothing happens
    but when the user click on the textbox (does not enter anything...)and hits
    the enter key, the button fires and gives wrong results.

    Please advice,
    Stephen.
     
    Stephen, Aug 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen

    Netscape + enter key Problem

    Stephen, Aug 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    395
    Stephen
    Aug 20, 2004
  2. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    414
    Anders Matthiessen
    Jan 12, 2005
  3. M P
    Replies:
    1
    Views:
    502
  4. Matt
    Replies:
    1
    Views:
    527
    Michael Winter
    Mar 6, 2004
  5. HopfZ
    Replies:
    0
    Views:
    597
    HopfZ
    Aug 28, 2006
Loading...

Share This Page