wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Cancel button should take to previous page 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 "Cancel button should take to previous page" Watch "Cancel button should take to previous page" New topic
Author

Cancel button should take to previous page

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192
Hi,

I am having servlet, which has 5 jsps. Each jsp has does a post and two buttons submit and cancel. the submit works fine, but whne i hit cancel it should take me to the previous page.


How this can be done ? On click of cancel should i set some variable using script.

Please help.

thanks
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815


I added the double quotes to make the code neater. This should send you back 1 page in history. If you want to go back 2 or more just supply the number of pages back inside the back function call (i.e. back(5) for 5 pages back).

Hope this helps.
Rob
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Cancel button should take to previous page
 
Similar Threads
Cancel Button
Getting html form name
problem while forwording the JSP page
Onclick form submission
multiple forms in JSP