[thelist] JavaScript - form.submit()
Anthony Baratta
Anthony at Baratta.com
Tue Aug 1 12:00:13 CDT 2000
Scott_Brady at themoneystore.com wrote:
>
> Thanks, Jeff! That seemed to work.
>
> The method I was using (doing a form.submit() in the Javascript, but putting a
> "return false;" in the onSubmit) was what I was taught in a JavaScript class
> about a year ago.
You don't need the submit() function if you are executing the javascript via the
onSubmit event. Its redundant, they collided - you lost. ;-)
> If I didn't like the way the ugly grey buttons look and wanted to use an image
> as a submit button, wouldn't I have use the submit() function? (I generally
> stick with the ugly buttons, so that situation hasn't come up with me yet)
If you use the input type=image, you also don't need the submit() function - since
clicking that is equivalent to using a submit button. If you decided to use a
type=button or a straight image (so you can do rollovers), you use the onClick event
and then you'll need the submit() function in your Java Script to submit the form.
(Therefore, you won't need the onSubmit event in your form tag with a button or
straight image.)
Hope that helps, or at least does not hurt.
--
Anthony Baratta
President
KeyBoard Jockeys
South Park Speaks Version 3 is here!!!
http://www.baratta.com/southpark
Powered by Tsunami
More information about the thelist
mailing list