469,352 Members | 1,795 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

submit shortcut

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
3 2431
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
"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
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.

Similar topics

5 posts views Thread by Pascal Batzli Jr | last post: by
4 posts views Thread by Salad | last post: by
reply views Thread by cefrancke | last post: by
reply views Thread by Marcel | last post: by
4 posts views Thread by I_AM_DON_AND_YOU? | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.