aspose file tools*
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: 823


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
 
Consider Paul's rocket mass heater.
 
subject: Cancel button should take to previous page