Solved

back button

Posted on 2011-03-09
6
431 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now