Solved

back button

Posted on 2011-03-09
6
434 Views
Last Modified: 2012-05-11
In the content <div> I have a jsp . it has a back button . When user clicks on it, it should show the previous page in the content <div>.

Whats the approach ?
0
Comment
Question by:cofactor
  • 3
  • 2
6 Comments
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 35092411
use window.history.forward() to go back the prvious page ?
0
 

Author Comment

by:cofactor
ID: 35092652
>>>use window.history.forward() to go back the prvious page ?

I want the previous page so back() is appropriate I think.

I tried  onclick="history.back();"   in the button ..but that does not work ...it throws the  login page.

But I want the previous page in the content <div>.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 35094712
Not possible with javascript. You may save the previous page with an unique id in a table (I mean save value of fields of that page) and when the user click on the div, rebuild the page with the fields and their saved value
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 82

Expert Comment

by:leakim971
ID: 35094757
you can load content of a page and put it easily in a div (or any other container) with jQuery and the function : http://api.jquery.com/load/

backupId = $("#backup").val();
$("#divId").load("previouspage.jsp?backupId=" + backupId + " body");

Open in new window

with

<input type="hidden" id="backupId" value="12345" />
<div id="divId"><!-- put previous page content(body) here --></div>

Open in new window

0
 

Accepted Solution

by:
cofactor earned 0 total points
ID: 35213804
I have used session. I have kept all the data in session . when the user clicks back . I have revult the page fetching data from session.
0
 

Author Closing Comment

by:cofactor
ID: 35252665
solved myself
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how can i select 4 29
add a 3rd selection to sum 7 25
how can i check if the text is an Isogram ? 2 25
How to convert from xls to xlsx using java 7 37
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question