Hi All
i want to disable browser back button in my application.i am using mbelow javascript but it is not working.can anyone please help me.
window.history.pushState(null, "", window.location.href);
window.onpopstate = function(event) {
var tl = document.title;
document.title="";
document.title= tl;
};
Hi @Arkyadeep Bharadwaj, please look at this documentation and see if it helps, Navigation.
Thanks
Gitansh Anand
do u have any sample?
Hi @Arkyadeep Bharadwaj ,Please check the oml attached.RegardsKrishnanand Pathak
Hi,
I have used the below Javascript,
window.onpopstate = function (event) {
var originalTitle = document.title;
document.title = "";
document.title = originalTitle;
window.location.reload();
Suggestions:
- Use this code at javascript tool in OnReady Event action. (Don't use the javascript in any Client/Server actions or at Global scripts, use at OnReady event action.)
- If you want any condition according to which you want to restrict the browser you can do that before calling the javascript in OnReady action.
- This javascript will restrict the back button of the browser. Used window.location.reload() so that the page reloads.
Please try if it can help you as well.