I have created system using ADF application that can detect 'BACK' button in the browser(e.g. firefox and google chrome).Everytime i click the 'BACK' button in the browser,it will prompt out message that ask user whether want to 'stay in the current page' or 'leave the page'. Once i click 'leave the page' it will take me to the login page.
Is there any possibility for go back to previous page in task flow when user click on browser's back button? By the way, the task flow is in the page fragment. can anyone tell me how to do it?Need this step urgently..
Thanks in advance.
The browser back button actually doesn't know how to navigate a view within a task flow. The recommendation is not not use the browser back button for navigation. Unfortunately there is no API we can use in ADF to suppress the browser back button other than using JS to delete the user browse history.
You could try something like this :
function disableBack() {
var check =window.location.search;
if (check && check.substring(1) =="X") {
window.location.replace(<new_url>);
}
}
You could also refer to this post : Clear browser history
As Frank mentioned, you should not use the browser back with adf apps and i dont think there is a way to disable that thru' adf.
来源:https://stackoverflow.com/questions/11167352/how-to-go-to-previous-page-in-task-flow-using-back-button-in-browser