[thelist] Submitting a form with javascript

Simon Perry simon.perry at si-designs.co.uk
Mon Nov 3 15:34:23 CST 2003


----- Original Message ----- 
From: "John Corry"

<snip></snip>
>The form is pretty long. I want to put an *optional* link elsewhere on the
>page from whence he can submit the form. There's a button too..but just
one,
>at the bottom of the form.


Am I missing something? Surely once you are in the form hitting enter at any
point will submit it. No looking for submit it links, no extra buttons, no
JavaScript, no messing with user expectations just a simple hit enter to
submit this form at any time. If you only have one form on the page then
open it after <body> and close it just before </body>, AFAIK this approach
is perfectly valid mark-up as any element can reside within the form tags.
At the very most the only thing you may need to do is one onfocus() call on
page load to ensure the form is "live".

Simon



More information about the thelist mailing list