Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<html:submit> vs. javascript submit

Status
Not open for further replies.

maxpower1

Programmer
Jul 29, 2001
488
0
0
US
Is there any difference between clickling <html:submit>
and calling document.formstruts.submit(), assuming the latter
is the same button?

when i click the <html:submit> button directly, my validate() function in ActionForm class is being run. However, when I called the javascript submit(), it skips the validations.

Are there things i need to set up to get this validate() to fire using the javascript submit()?

~za~
You can't bring back a dead thread!
 
It should still run the validate() function in whatever way the form is submitted. What is your code in validate() function?
 
watch out cause i think the submit() method does not call the onSubmit() from the page, so if u have something like <form... onSubmit(), u have to call it manually
cheers,
Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top