stop enter key from submitting a form

Discussion in 'HTML' started by Phil, Sep 13, 2003.

  1. Phil

    Phil Guest

    Anyone know how to stop , in html, the enter key
    from submitting a form ? That is, in my online survey,
    if I accidently press [enter], the software interpretes
    it as equivalent to clicking on the "submit' button.
    The solution has to work on Netscape or IE (veerions 5 or higher)
    Any ideas are appreciated.
     
    Phil, Sep 13, 2003
    #1
    1. Advertising

  2. Phil

    Andy Holmes Guest

    Phil wrote:
    > Anyone know how to stop , in html, the enter key
    > from submitting a form ? That is, in my online survey,
    > if I accidently press [enter], the software interpretes
    > it as equivalent to clicking on the "submit' button.
    > The solution has to work on Netscape or IE (veerions 5 or higher)
    > Any ideas are appreciated.


    Well, you could try to catch the key press with javascript and have it
    return false. That's a little vague I know, but just to give you a
    general idea...

    -Andy
     
    Andy Holmes, Sep 13, 2003
    #2
    1. Advertising

  3. Phil

    rf Guest

    "Phil" <> wrote in message
    news:...
    > Anyone know how to stop , in html, the enter key
    > from submitting a form ? That is, in my online survey,
    > if I accidently press [enter], the software interpretes
    > it as equivalent to clicking on the "submit' button.
    > The solution has to work on Netscape or IE (veerions 5 or higher)
    > Any ideas are appreciated.


    It appears this can't be done reliably.

    http://allmyfaqs.com/faq.pl?HTML_Forms

    Cheers
    Richard.
     
    rf, Sep 13, 2003
    #3
    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. thechaosengine
    Replies:
    2
    Views:
    490
  2. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    447
    Anders Matthiessen
    Jan 12, 2005
  3. Veronica Bourke

    C# .NET stop carriage return/enter key submitting the form

    Veronica Bourke, Feb 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    1,246
    Veronica Bourke
    Feb 16, 2005
  4. M P
    Replies:
    1
    Views:
    560
  5. donpro
    Replies:
    2
    Views:
    128
    Bart Van der Donck
    Nov 9, 2007
Loading...

Share This Page