input=text fires Submit when pressing Enter

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default input=text fires Submit when pressing Enter

    Hello

    I have some textboxes (input type=Text) in a Form.

    In some Forms if I Press Enter while I am in the Textbox It causes a Submit.
    The input type is text not submit.

    It's obsure that the effect is only on some webform's not in all.


    How can I stop the submit ?


    Jerry Guest

  2. Similar Questions and Discussions

    1. Pressing Enter screws up my template - line breaksimages
      OK I am using a template. I have defined an editable region. When I press enter inside the region the navigation panel on left breaks apart. How can...
    2. Enter key causes submit action in form
      I've created a form using Dreamweaver 4.0 and I see that pressing the Enter key in any blank field in the form causes a "Submit" action. When there...
    3. $_POST behavior from input=submit vs input-type=button
      Hello all, I have been trying to solve an annoying behavior with PHP (I think). Maybe some of you have encountered the same and have some ideas....
    4. Append a text line by pressing a submit button
      Hi, I made a small text field form, now I want to append the name of the text to a new line by pressing a submit button. The form action =...
    5. Get text in TextBox without pressing Enter key
      I want to enter characters in a TextBox in a WebForm, press a Button in the WebForm, and read the characters that were typed into the TextBox from...
  3. #2

    Default input=text fires Submit when pressing Enter

    Hi

    I guess, when you press enter form submit happens when
    there is one textbox in the form.

    Ravikanth



    >-----Original Message-----
    >Hello
    >
    >I have some textboxes (input type=Text) in a Form.
    >
    >In some Forms if I Press Enter while I am in the Textbox
    It causes a Submit.
    >The input type is text not submit.
    >
    >It's obsure that the effect is only on some webform's
    not in all.
    >
    >
    >How can I stop the submit ?
    >
    >
    >.
    >
    Ravikanth[MVP] Guest

  4. #3

    Default Re: input=text fires Submit when pressing Enter

    Hmm, that's not the case....... But thanx anyway....

    I have a textbox type=text
    a Password Textbox type=password
    and a Submit Button on the Form.

    The WebForm was created with the FormDesigner from Visual Studio
    using the WebControls.


    I found that a textbox can have an Attribute "nosubmit" but it doesn't work
    not......

    <input type=text nosubmit .........>

    very strange...

    "Ravikanth[MVP]" <dvravikanth@hotmail.com> schrieb im Newsbeitrag
    news:066c01c35288$eb40d3b0$a601280a@phx.gbl...
    > Hi
    >
    > I guess, when you press enter form submit happens when
    > there is one textbox in the form.
    >
    > Ravikanth
    >
    >
    >
    >
    > >-----Original Message-----
    > >Hello
    > >
    > >I have some textboxes (input type=Text) in a Form.
    > >
    > >In some Forms if I Press Enter while I am in the Textbox
    > It causes a Submit.
    > >The input type is text not submit.
    > >
    > >It's obsure that the effect is only on some webform's
    > not in all.
    > >
    > >
    > >How can I stop the submit ?
    > >
    > >
    > >.
    > >

    Jerry Guest

  5. #4

    Default Re: input=text fires Submit when pressing Enter

    Check out this article, this will explain why it is behaving like this
    [url]http://www.allasp.net/enterkey.aspx[/url]

    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Jerry" <Jerry@Jerry.com> wrote in message
    news:bfqn7a$9l$03$1@news.t-online.com...
    > Hello
    >
    > I have some textboxes (input type=Text) in a Form.
    >
    > In some Forms if I Press Enter while I am in the Textbox It causes a
    Submit.
    > The input type is text not submit.
    >
    > It's obsure that the effect is only on some webform's not in all.
    >
    >
    > How can I stop the submit ?
    >
    >

    Saravana Guest

  6. #5

    Default Re: input=text fires Submit when pressing Enter

    Actually, my understanding is that this depends on whether the number of
    textboxes is odd or even.

    See [url]http://www.allasp.net/enterkey.aspx[/url], which may be of help.
    --
    John Saunders
    Internet Engineer
    [email]john.saunders@surfcontrol.com[/email]


    "Ravikanth[MVP]" <dvravikanth@hotmail.com> wrote in message
    news:066c01c35288$eb40d3b0$a601280a@phx.gbl...
    > Hi
    >
    > I guess, when you press enter form submit happens when
    > there is one textbox in the form.
    >
    > Ravikanth
    >
    >
    >
    >
    > >-----Original Message-----
    > >Hello
    > >
    > >I have some textboxes (input type=Text) in a Form.
    > >
    > >In some Forms if I Press Enter while I am in the Textbox
    > It causes a Submit.
    > >The input type is text not submit.
    > >
    > >It's obsure that the effect is only on some webform's
    > not in all.
    > >
    > >
    > >How can I stop the submit ?
    > >
    > >
    > >.
    > >

    John Saunders Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139