By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Submitting the form correctly using the enter key

P: n/a
Hi all,

Simple problem:

I have a simple form and a submit and cancel image button underneath.

I also have a logout image button at the top of the page. This button is
rendered from a user control that is seperate from the form page itself.

At the moment if I press enter when inside a textbox the log out button is
activated. How can I make sure that the submit button is activated when the
user presses enter?

Many thanks all

Kind Regards
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Enter activates the first submit button in the layout. See details at
http://www.allasp.net/enterkey.aspx

Can you place the logout button after the submit one?

Eliyahu

"thechaosengine" <sh856531@microsofts_free_email_service.com> wrote in
message news:O5****************@TK2MSFTNGP10.phx.gbl...
Hi all,

Simple problem:

I have a simple form and a submit and cancel image button underneath.

I also have a logout image button at the top of the page. This button is
rendered from a user control that is seperate from the form page itself.

At the moment if I press enter when inside a textbox the log out button is
activated. How can I make sure that the submit button is activated when the user presses enter?

Many thanks all

Kind Regards

Nov 19 '05 #2

P: n/a
thechaosengine wrote:
Hi all,

Simple problem:

I have a simple form and a submit and cancel image button underneath.

I also have a logout image button at the top of the page. This button
is rendered from a user control that is seperate from the form page
itself.

At the moment if I press enter when inside a textbox the log out
button is activated. How can I make sure that the submit button is
activated when the user presses enter?

Many thanks all

Kind Regards


You can capture the Enter key with JavaScript
to get the behavior you want:
http://dotnetjunkies.com/WebLog/darr...3/03/8374.aspx

--

Riki
Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.