[thelist] Submitting a form with javascript

John Corry lists at neoncowboy.com
Mon Nov 3 14:09:02 CST 2003


 
The form is for a flower farmer to update the list of available
flowers/varieties/colors.

The flower farmer (NS 7/Win XP) is the only person using the form.

He can see. He can hear. He has JavaScript turned on.

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.

I don't need the onSubmit event.

As far as I know, a submit button can only be in the form that is being
submitted. That won't work, I need it in a whole different part of the page.

Of course you're right .jeff, and maybe I won't do it this way, maybe I'll
just sprinkle submit buttons throughout the form...but in the context I'm
working in, using a link with submit() just is not that out of line.

You'll notice that my original post did not say:
'Help, I need to be educated on the best way to balance accessibility and to
know the best way to submit my form'

I don't care about the dogma, I can figure that out on my own. Thanks.

John Corry

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Jeff Howden
Sent: Sunday, November 02, 2003 10:59 PM
To: thelist at lists.evolt.org

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: John Corry
>
> A form object's submit() method will not work if the form has an input 
> named 'submit'.
>
> Change the name of the submit button and you've got it.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

<tip type="JavaScript" author=".jeff">

the submit() method is the lazy developer's way out of doing something the
right way.  never use it.  instead, consider an alternate means of
submitting the form, like say, including a submit button that *everyone* can
use.

</tip>

<tip type="JavaScript" author=".jeff">

beware of the submit() method.  it won't cause the onsubmit event handler to
fire.

</tip>

.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist Resume -
http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester and archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list