matthewlesh Posted January 26, 2008 Share Posted January 26, 2008 Hello everyone out there.... I am currently re develping an ajax system i wrote a while back a small downloads system, the basics of it is that it just goes to the next page.... But people have complained that they can't press the back button on there brower.. so i added... window.location.hash = 'file-'+num; Works great but it doesn't allow the user to go back.. i have started looking up stuff online about how to do this but it seems very complicated and a complete re write of the script.. so i was wondering if any one out there knew a simple way to quickly make the back button work on the system... I am planing to do the bookmarking of those links with PHP to make it easiest.. In advance thank you, thank you, thank you for any help you can give... Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 27, 2008 Share Posted January 27, 2008 you could set a cookie based on the url and have your script check for the cookie and redirect accordingly on page load (with onload event). Quote Link to comment Share on other sites More sharing options...
matthewlesh Posted January 27, 2008 Author Share Posted January 27, 2008 I don't really understand.. how does this make the back button work? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 28, 2008 Share Posted January 28, 2008 if your javascript or php is set up to create/check for the cookie and finds that a specific cookie exist; you set up a redirect based on a specific cookie's name or content. that way; as soon as the page loads or before the page loads (using server side - like php); they will be sent to the specific pagination (I assume that is what your doing with this) your ajax script sent them to; when they click the "next" button or whatever they did to trigger the ajax function. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.