Click enter does not submit the page

  1. #1

    Click enter does not submit the page

    Hi:

    I use Ext.Net 2.4 and has a button in my page. type is submit. when I click enter key in the page. submit button click event is not called.
    Do you how to submit the button event when user click enter key? Does KeyMap work in version 2.4?
    <ext:Button ID="Button1" runat="server" Text="Search" Type="Submit" >
                                            <Listeners>
                                                <Click Handler="DoSearch(#{ff1},#{cmbDocTypes}.getValue());" />
                                            </Listeners>
                                        </ext:Button>
    Thanks
    Holly
  2. #2
    Hi @Holly,

    I think the Button's Type property doesn't work for a while, because a Button as not rendered as a button HTML tag. We should consider removal of this property.

    Where is that Button? If it is inside a Window or a FormPanel, you can set up its DefaultButton property.
  3. #3

    DefaultButton property works for FormPanel

    Thanks for your reply. DefaultButton property works for FormPanel when your cursor is in the FormPanel. Do you have other solution for page level when you click enter. it will submit the form doesn't need your cursor is in the FormPanel?


    Quote Originally Posted by Daniil View Post
    Hi @Holly,

    I think the Button's Type property doesn't work for a while, because a Button as not rendered as a button HTML tag. We should consider removal of this property.

    Where is that Button? If it is inside a Window or a FormPanel, you can set up its DefaultButton property.
  4. #4
    I can suggest to listen to a key press on the <body> level.

Similar Threads

  1. Replies: 4
    Last Post: Oct 10, 2011, 4:28 PM
  2. Enter Click for normal asp textbox
    By Nagaraju in forum 1.x Help
    Replies: 1
    Last Post: May 17, 2011, 3:36 PM
  3. [CLOSED] Enter = submit
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 22, 2010, 1:20 PM
  4. [CLOSED] TextField SpecialKey Submit and Enter/Backspace
    By macap in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Apr 28, 2010, 4:20 PM
  5. Map Enter Key to Button Submit
    By mathec in forum 1.x Help
    Replies: 1
    Last Post: Jan 20, 2009, 1:25 PM

Posting Permissions