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
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"
 
Don't get me started about those stupid light bulbs.
 
subject: How to submit a form ?