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

submit shortcut

P: n/a
I've been asked to provide a shortcut key to a form's submit button (long
complex inhouse form). Is there a way to do this in HTML, I can think of a
number of ways to do this with javascript. I think just placing focus on
that (the submit element) so an enter would submit is sufficient.

Jeff
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Fri, 30 Jan 2004 22:38:05 GMT, Jeff Thies <no****@nospam.net> wrote:
I've been asked to provide a shortcut key to a form's submit button
(long
complex inhouse form). Is there a way to do this in HTML, I can think of
a
number of ways to do this with javascript. I think just placing focus on
that (the submit element) so an enter would submit is sufficient.

http://www.w3.org/TR/html401/interac...adef-accesskey

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #2

P: n/a
"Rijk van Geijtenbeek" <ri**@opera.com> wrote:
I've been asked to provide a shortcut key to a form's submit
button (long
complex inhouse form). Is there a way to do this in HTML, I can
think of a number of ways to do this with javascript. I think
just placing focus on that (the submit element) so an enter would
submit is sufficient.


http://www.w3.org/TR/html401/interac...adef-accesskey


So one _could_ use
<input type="submit" accesskey="s">
and on most present-day browsers, hitting Alt+s anywhere would either
focus on the submit button or actually submit the form. So far so good.

On the other hand, this would mean that when using such a page
I, for instance, would accidentally submit the form when I actually
wanted to bookmark the page. (On my IE, Alt+s normally opens the
browser menu for managing bookmarks, i.e. favorites. On someone else's
browser, it does something completely different.)

More info:
http://www.cs.tut.fi/~jkorpela/forms/accesskey.html

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3

P: n/a
On Mon, 2 Feb 2004 00:27:03 +0000 (UTC), Jukka K. Korpela
<jk******@cs.tut.fi> wrote:

I've been asked to provide a shortcut key to a form's submit
button (long
complex inhouse form).
... this would mean that when using such a page
I, for instance, would accidentally submit the form when I actually
wanted to bookmark the page.


Being that it's an inhouse form, this might be manageable. I certainly
don't think they are currently very viable for publically-accessible sites.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.