jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes How to go back to a page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to go back to a page" Watch "How to go back to a page" New topic

How to go back to a page

sruthi reddy
Ranch Hand

Joined: Aug 03, 2008
Posts: 34
I have a situation where i need to go back to the same page.
For example, I has pageA which loads some data onload using javascript onload method.when we search on pageA we will get different set of data and when i click on link from this search results of pageA it will take back to pageB. From pageB i am using history.go method to come back to pageA. But as pageA loads its giving me intial data of pageA as it is calling onload method. Is there a way in which i can go back to same search page from wherei selected the link instead of intial data.
Aditya Keyal
Ranch Hand

Joined: Dec 01, 2008
Posts: 71
The simplest way would be to pass the search criteria from pageA to pageB and when in pageB don't use history.go but call pageA via the url. And here again pass the same search criteria and extend your onload to read the search criteria and move the focus there. (I hope you are not using static pages only)


- Aditya Webservices Blog
I agree. Here's the link: http://aspose.com/file-tools
subject: How to go back to a page
It's not a secret anymore!