trevorg Posted April 24, 2003 Share Posted April 24, 2003 Sorry if this is a dumb question, Is it possible to sort the results on a single page one or multiple times (Using the [FMP-Link: s]), and then if the user clicks the back button on the browser, be returned to the original page that the query was initiated from instead of the previously sorted page? To the user it looks like they are on the "same" page, and only sorting the contents, but we know that these are new pages that the WC is creating. I'm just wondering if there is some trick out there to tell the browser not to include the sorted pages in the "back" history. Thanks. Link to comment Share on other sites More sharing options...
Leb i Sol Posted April 25, 2003 Share Posted April 25, 2003 u can use some javascript: <a href="javascript:history.go(-1)">GO BACK</a> and in the .back(X) X is where you would define how many steps back you want them to take.....so history.go(-2)...on so on. give it try .:. Link to comment Share on other sites More sharing options...
trevorg Posted April 25, 2003 Author Share Posted April 25, 2003 The method you provided would work if I had a go back link on the page, but I wanted it to work if they clicked the browsers back button. You got me looking in the right direction though. I came across this little gem that works perfect! <SCRIPT LANGUAGE="JavaScript"><!-- function go(url) { if (document.images) location.replace(url); else location.href = url; } //--></SCRIPT> <A HREF="javascript:go('http://www.somewhere.com/apage.html')">Got to a page</A> Now they can click the sort links, and the current history object is overwritten with the new sorted page. When they do click the Back button on the browser, they are returned to the orginal page, and not through the sorting iterations. Link to comment Share on other sites More sharing options...
Leb i Sol Posted April 26, 2003 Share Posted April 26, 2003 good I am glad you find the way...sorry but you were not that specific what kind of nav system you have so I gave you the quick & dirty resolution. "give a man a fish vs. teach a man to fish" Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7865 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now