Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Block browser back button and right Click on Portal.

SA-10799

Summary



Procedure to stop the user to go back screen using IE back button or through right click context menu. 


Steps to Reproduce



Use IE back button or "Back" option in right click context menu to navigate to the previous screen of the work flow and then click Submit in the screen.

Resolution



This issue is resolved through the following local-change:

 Pass this javascript function in the Portal Harness to block it on some specific portal or copy the following code in UserWorkForm HTML Fragment if you are planning to stop this on the entire application:



var message="Function Disabled!";
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
pega.util.Event.stopEvent(event); 
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")



 

Published July 9, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us