Event Handling

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AnonymousOne

    Event Handling

    Greetings,

    I am trying to prevent certain keystrokes from occuring within a text
    field. I am able to capture these events, but I don't seem to be able to
    prevent the underlying action from proceeding. Making the function
    return "false" works fine under IE, but it does not work on Mozilla,
    despite some coding examples I've seen on the Netscape site.

    I had hoped that there might be a predefined function within the
    JavaScript engine which would do this, but I have yet to find one.
  • Martin Honnen

    #2
    Re: Event Handling



    AnonymousOne wrote:
    [color=blue]
    > I am trying to prevent certain keystrokes from occuring within a text
    > field. I am able to capture these events, but I don't seem to be able to
    > prevent the underlying action from proceeding. Making the function
    > return "false" works fine under IE, but it does not work on Mozilla,
    > despite some coding examples I've seen on the Netscape site.[/color]

    Use
    <input onkeypress="ret urn false;"
    to cancel keys with Mozilla/Netscape 6/7.

    --

    Martin Honnen

    Comment

    Working...