I am too stupid to make two input boxes work.

Discussion in 'HTML' started by Noname, Jan 15, 2004.

  1. Noname

    Noname Guest

    The following code:

    <HTML>
    <FORM NAME="additem" METHOD="get" ACTION="addtestentry.php">
    <INPUT TYPE="text" SIZE="10" NAME="testdate">
    </FORM>
    <HTML>

    calls up the php page like I want it to. But when I add another
    input box like so:

    <HTML>
    <FORM NAME="additem" METHOD="get" ACTION="addtestentry.php">
    <INPUT TYPE="text" SIZE="10" NAME="testdate">
    <INPUT TYPE="text" SIZE="10" NAME="testdate2">
    </FORM>
    <HTML>

    No matter which text box has the focus, nothing happens when I hit
    Enter.

    I have stripped all the code except what you see above to try
    to isolate the problem... still the first example works and the
    second one does not.

    What am I doing wrong?


    Thanks
     
    Noname, Jan 15, 2004
    #1
    1. Advertising

  2. Noname

    Steve Pugh Guest

    Noname <> wrote:

    > <FORM NAME="additem" METHOD="get" ACTION="addtestentry.php">
    > <INPUT TYPE="text" SIZE="10" NAME="testdate">
    > </FORM>
    >
    >calls up the php page like I want it to. But when I add another
    >input box like so:
    >
    > <FORM NAME="additem" METHOD="get" ACTION="addtestentry.php">
    > <INPUT TYPE="text" SIZE="10" NAME="testdate">
    > <INPUT TYPE="text" SIZE="10" NAME="testdate2">
    > </FORM>
    >
    >No matter which text box has the focus, nothing happens when I hit
    >Enter.


    That's normal. Most browsers only submit the form upon hitting Enter
    if there is zero or one text input. You need a submit button.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jan 15, 2004
    #2
    1. Advertising

  3. On Thu, 15 Jan 2004 11:07:40 -0700, Noname wrote:

    > No matter which text box has the focus, nothing happens when I hit
    > Enter.


    <input type="submit" name="submit" value="Go!">

    --
    Jeffrey D. Silverman | jeffrey AT jhu DOT edu
    Website | http://www.wse.jhu.edu/newtnotes/
     
    Jeffrey Silverman, Jan 16, 2004
    #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. Mike Foster
    Replies:
    0
    Views:
    914
    Mike Foster
    Jun 23, 2003
  2. Mark Parnell
    Replies:
    0
    Views:
    824
    Mark Parnell
    Jun 24, 2003
  3. Stefan Mueller
    Replies:
    5
    Views:
    12,415
    jamesxa
    Jun 16, 2009
  4. Brandon McCombs
    Replies:
    4
    Views:
    519
    Richard Wheeldon
    Aug 28, 2006
  5. rincewind

    stupid, STUPID question!

    rincewind, Apr 19, 2009, in forum: HTML
    Replies:
    25
    Views:
    1,032
Loading...

Share This Page