Browser back without data reloading

Posted on 2004-11-10
Last Modified: 2008-03-03
I have three web pages: A, B, and C. A can be scrollable and has a control to go to B. B allows you to click to C. If I enter data on A (but don't save it), click to B (which is the same window), click to C (which is a new window), cancel in C, which closes C and therefore shows B untouched, cancel in B and return back to A, I lose my changes on A, as A refreshes its data.

In other words: A>B>(new window C)>B>A

I'm using window.location = "javascript:history.go(-1);" to go back to A.

Is there a way to go "back" to A, preserving its scroll location, data, and NOT refresh?


Question by:robinh583
    LVL 6

    Accepted Solution

    Check this out as a solution, just an Idea.

    Also look here for some other means of solutions:
    LVL 15

    Expert Comment

    I guess that last link could do it. Theres no way of getting this to happend if you dont save the data in some way.. either by passing it as variables, session objects, or formpassing.

    Author Comment

    Thanks! This seems pretty close, but the specific problem is that page "C" is in a new window.

    If I fill in page "A," don't save but jump to "B" (which is in the same window and which I get to by clicking a URL that is set up to "look" like a button) and then return back to "A," everything's fine. The problem is when "B" opens a new window (which is gotten to via a true button click), no matter what that window does. When I go back to "B" (either leaving "C" open or closing it), "B" is exactly as it was before I opened "C" and is fine. HOWEVER, when I close "B", "A" somehow is forced to refresh and reloads it's data from my DB.

    If I had only gone from "A" to "B" and back, no refresh is done and life is happy happy happy.

    One sidebar issue (not sure this makes a difference or if there's a better way to do this): the reason "A" gets to "B" via a URL dressed up to look like a button is that "A" is a long list of questions (from a DB read), each of which can optionally go to a "comments" page related to that question. We need the jump to be done via a button but could not figure out how to populate all of the buttons with the proper params it needs to pass to the comments page so that page can see what question it needs to collect comments on.

    Thanks for all your thoughts, suggestions, and guffaws.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
    This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
    This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
    How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

    760 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

    11 Experts available now in Live!

    Get 1:1 Help Now