my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Sequence of Events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Sequence of Events" Watch "Sequence of Events" New topic
Author

Sequence of Events

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
Heres my scenario (F1 is the main frame, F2 will hold a page to allow user-friendly prints) :
1) I have a page that has 2 frames (F1 and F2 with F2 having a height of 0)
2) In F1 I have a link that goes to the first HTML page (actually a perl script that generates an HTML page), upon loading that page F2 gets an assignment HTML page (just text in case the user tries to print using a print button assigned by me on the F1 frame).
3) In F1 I execute a report that calls the perl script again. The perl script generates a tabular report with links. F2 gets populated with a new page that holds an user-friendly report that can't be seen.
4) Clicking on a link in F1 calls the perl script again generating a new report in F1. F2 gets a new page once again with the second user-friendly report.

Here's the thing I clicked once to call the F1 perl script, clicked to execute and retrieve a report and then clicked a link to go to the drilldown page. Thats 3 forwards if you will. To get back to the first page you'd think I'd have to click the browser's Back button 3 times. I click Back and I get the same page in F1 and in F2 I get the page before I loaded the drilldown page (i.e. the first report). Clicking Back again gets me the 1st report in F1 and the drilldown page in F2 again (I use the same ID for all reports is why this is happening). Back again gets me the same page in F1 and the assignment page in F2. Back again gets the inital search page in F1 and the assignment page in F2. Finally on the next click I get back to the first screen.
When I load a page in F1 I load a different page in F2 within the javascript section of F1. Since this changes the overall containing page I need 2 Backs to achieve the 1 I want. Is there a way to accomplish this? A different way to assign a page to F2 may be what I'm looking for. Hopefully I accomplished being thorough.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
look into location.replace()

Eric
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
Dangnation you got it. I thought that replace would add on to the history as well. Thanks alot Eric.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sequence of Events
 
Similar Threads
How to make a JSP/HTML page to stay on itself when user clicks on back button on the browser?
God I hope someone has a solution...
browser back button problem.
Problem refreshing page
Reload/Refresh a page