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.
posted 8 years ago
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).