www.webdeveloper.com
Results 1 to 5 of 5

Thread: using the enter key

  1. #1
    Join Date
    Jan 2004
    Posts
    2

    Question using the enter key

    I am real new at this.

    I am developing a php application with a mysql db. I would like the user to be able to hit the "enter" key to tab through fields, instead of having to use tab.

    How do I do this.

    I am running it on a Linux server using apache

  2. #2
    Join Date
    Jul 2003
    Location
    Boston Area, Massachusetts
    Posts
    3,489
    Welcome to the forums.

    I don't see why you put this in the feedback section, but I'll attempt to help anyway.

    My question to would be this: why? It just doesn't really make much sense as to why you'd want to do such a thing. The enter key already has a meaning when inside a form element and that is to submit the form. On the same note, the tab key already has a meaning that most users are aware of: to navigate through the form elements.

    Also note, by doing this, users in which have browsers that don't support JavaScript or have JavaScript currently disabled will accidentaly submit the form if they try using the enter key to tab to the next or previous element in the form.
    Last edited by fredmv; 01-26-2004 at 03:53 PM.

  3. #3
    Join Date
    Jan 2004
    Posts
    2
    There are a lot of websites that allow the user to press enter to negotiate to the next field. And I want to do it to make it easier for the user. There are still alot that can't remember the tab key

  4. #4
    Join Date
    Jul 2003
    Location
    Boston Area, Massachusetts
    Posts
    3,489
    I don't see how that would make it easier, and there are — for sure — many more sites that have no extra scripting involved as opposed to the sites that let the user use the enter key (e.g., this one, etc.). I just don't see any benefits of using it. It's not very good for usability because it uses a non-standard key for achieving a task that most users are already familar with that users another key to do it, not to mention people will become frusturated after the form submits when they didn't actually want it to (i.e., in the case of a user that has JavaScript support off or the browser simply doesn't support JavaScript).
    Last edited by fredmv; 02-24-2004 at 12:34 AM.

  5. #5
    Join Date
    Dec 2003
    Location
    Netherlands
    Posts
    642
    Hallo, (sorry for using the feedback-forum)

    Today i searched the web to control the enter-button. In a lot of my forms the enter button submit's the form like excepted. Now i have created a form dynamicly with php it doesn't work.

    here is the code, any idea?
    PHP Code:

        
    <html>
        <
    head>
        <
    title>nummerbord detail</title>
        <
    link href="../../berg.css" rel="stylesheet" type="text/css">
        </
    head>
        <
    body topmargin="50" leftmargin="25">
        <
    form action="" method="post" name="check">
          <
    table border="0">
              <
    tr>
              <
    td class="bodySmallBoldBlue" height="50" colspan="2">Geef hier de unieke serienummer op:</td>
            </
    tr>
            <
    tr>
              <
    td class="bodySmallRight"><input type="text" name="lucky_number" size="10" maxlength="11"></td>
              <
    td><input type="Submit" name="submit" value="Check"></td>
              </
    tr>
          </
    table>
        </
    form>
        </
    body>
        </
    html

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