Results 1 to 5 of 5

Thread: Button being clicked in Firefox

  1. #1
    Join Date
    Jan 2005

    Button being clicked in Firefox

    I have a button that fires an onlclick event. In the event the button updates some field values and then does a form.submit. The problem I am having in Firefox is when I navigate down a column using the enter key (on the keyboard) along with event.keycode the button I set up fires the submit. This only happens in firefox it is fine in IE. Is there any way to prevent the button from being executed when hitting the enter key.

  2. #2
    Join Date
    Mar 2005
    Quote Originally Posted by ckopacko
    Is there any way to prevent the button from being executed when hitting the enter key.
    Yes, but this would limit me and other users who don't use a mouse. I wouldn't recommend it, but there is code to do it. Someone should have it here. I've no time to look it up.

  3. #3
    Join Date
    Nov 2002
    Dartmoor [Holiday]
    A principal rule of usable design is that you shouldn't mess with the users' expectations, and pressing enter to submit the form is fairly standard. If you are concerned about his, add validation or confirmation so that users pressing enter too early don't suffer from their mistake.

    "If youíre not using valid HTML, then you havenít created a Web page. You may have created something else, but it isnít a Web page." - Joe Clark

    Do something amazing (USA) | Make Poverty History

  4. #4
    Join Date
    Feb 2005
    Kalamazoo, MI
    Personally I wouldnt be worried about those few people that dont use a mouse. Cant conform to everyones needs, so rule of thumb, conform to the majority.

  5. #5
    Join Date
    Mar 2005
    Sydney, Australia
    cthrow, I assume that you intend giving up visiting the web if you ever go blind or suffer some other injury that stops you from being able to use the mouse because if web pages are built following your suggestion then you will not be able to access them in that situation.

    Web pages should be designed so that all visitors can access them. The only exception should be restrictions relating to the actual subject matter of the page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles