Results 1 to 4 of 4

Thread: Disable "Enter" Key in Form not running

  1. #1
    Join Date
    May 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Disable "Enter" Key in Form not running

    1) Script Title: Disable "Enter" Key in Form

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...sableenter.htm

    3) Describe problem: It just doesn't work.....
    I have tried to remove the other script running on the same line, same (read no) result.
    I use it here:
    http://www.printlight.dk/bestil-bizcard.php
    It's applied to "<input id="antal" ....>"

    Have made a copy here:
    http://www.printlight.dk/bestil-bizcard-dd.php
    With only this script on the field.

    I have searched through the code, there is no duplicate valuenames, or scriptnames.

    /Danjel

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    When you press "Enter" within the "Antal navne" INPUT field, does your form submit anyway? In FF3.5 at least, it doesn't, which seem to suggest the script is working.
    DD Admin

  3. #3
    Join Date
    May 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, it doesn't submit, even if I check the checkbox at the bottom, just above the "Se ordre" button.
    The "Se ordre" is the submitbutton.
    My main reason for using this script was to have it go to the next field, and that doesn't work.
    Not submitting is handled by the checkbox at the bottom, also one of your scripts :-)
    http://www.dynamicdrive.com/dynamici...acceptterm.htm

    What I want, really, is to have it go to the next field, and trigger the "onchange" for that field (antal).

    Thanks for a great site :-)

    /Danjel

  4. #4
    Join Date
    May 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Have investigated further.

    Using "alert" popups, I have confirmed that the script is running.
    The form is not submitted.
    However the focus is not moved to the next field.

    Furthermore, according to my tests, the script does not catch the enter key in IE 7.0.5730.11 on winXP pro.

    TIA
    /Danjel

Bookmarks

Posting Permissions

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