This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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"
 
jQuery in Action, 2nd edition
 
subject: How to submit a form ?