Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to submit a form ?

 
Anu satya
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Amol Fuke
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic