aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to submit a form ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to submit a form ?" Watch "How to submit a form ?" New topic
Author

How to submit a form ?

Anu satya
Ranch Hand

Joined: Mar 17, 2005
Posts: 146
Hi, I have a problem in submiting the form.
there is a condition. IF that condition is satisfied, then form has to be submitted to next page otherwise, the form has to be submitted to the same page. How do i do that ? my code is as follows:

in the above code, on click of submit button, given condition (say value of a textbox is equal to a 999 or not.)has to be checked. if condition is true, submit the page to confirm.html otherwise, submit the page to same form2.html.

How do i do it? can anyone help me ?
Thanks for your time and help


With Regards,
Anu
Amol Fuke
Ranch Hand

Joined: Apr 08, 2005
Posts: 129
Write a javascript function on onClick event of submit button and then check for the condition in that function.Then forward/submit the page depending upon your condition.
For how to write javascript function,do little bit of googling.


"There are no mistakes, only lessons"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to submit a form ?
 
Similar Threads
Multiple form with one action
retreiving request parameter of second frame in first
how to load the same jsp page and set user id to 0 when checkbox is selected
Multiple Submit button in one jsp
Loading multiple forms in single jsp