This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Self Submit Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Self Submit Form" Watch "Self Submit Form" New topic

Self Submit Form

Preetish Madalia
Ranch Hand

Joined: Dec 12, 2007
Posts: 37
Does any one have the javascript that can self submit a form.
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30136

The JavaScript to submit a form is just form.submit(). You call this from the event that triggers the form submit.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bryce Martin
Ranch Hand

Joined: Nov 19, 2007
Posts: 269
Here is a self submitting form I wrote for a jsp. Its simple, clean, and it works flawlessly.

Salt and Pepper to taste.

Preetish Madalia
Ranch Hand

Joined: Dec 12, 2007
Posts: 37
Thanks Both..
I Got It.
It is sorta covered in the JavaRanch Style Guide.
subject: Self Submit Form
Similar Threads
Ajax with Struts - Loading the lookup values in drop down
how to add values to servlet and call that servlet
Help needed with IE 6.0 submit
How to make two submits to work serially
Save form data to server hard disk via JSP