I want to change the function of the "back" browser button. I tried with this:
window.onbeforeunload = function() {
show_page(last_page, 'not-search');
}
and it works, in part: it calls the function but the browser navigates to the previous page anyway. Is there a solution for that?
EDIT
I need to do that:
index(ajax content) ---user click--->other ajax content(i call it A content)
A content --->back button ---->previous index content