Hi, I'm using mootools-1.2.1-core.js and mootools-1.2-more.js and I'm trying to use HistoryManager to get my Back button working... But I cant get it working... Could you help me? Do you have any simple alternative to get Ajax website using Browser's Back Button? Thanks in advance.
I got this but I neede some help... Anyone? http://digitarald.de/project/history-manager/1-0/showcase/complex/ Thanks.
Yea, not sure about mootools- never heard or used it. But why don't you just code it yourself? It would be simple enough- 1 array (or two but I'll get to that), add to the function that loads your ajax page to append the url to the array. Build a function that loads the last element in the array as a page (call your pageload function with the last element)- then link your back button to fire that function. You'll also need to remove the element that was just loaded- I would suggest to remove it then append it onto a forward array, eh? same thing with the forward button as the back button. Would be simple enough, how skilled are you? Otherwise I can't really help with mootools. . . Have you gone through the docs?
http://digitarald.de/project/history-manager/1-0/source/HistoryManager.js - this history manager uses mootools 1.11 not 1.2. there's a huge difference in implementation, in particular to do with classes. your best bet is to post on the mootools mail list, Harald Kirschner (digitarald) is a regular there and may be able to assist you or even offer a 1.2 version of the class. as was pointed out, coding such a function is easy enough in mootools or not. all you need to do is record your session urls via php and have the js reuqest latest 'good' url from a php handler. uses are, for instance, in e-commerce sites, a continue shopping button etc - they can direct you to a useful page, not history -1...
I came across this solution: http://code.google.com/p/unfocus-history-keeper/ For the rest I'm using Mootools 1.2 But Thanks!