Below JS function will use for disabling the new tab functionality and it will throw the alert message.
  1. function disableNewTabClick() {
  2. var listCtrl = document.getElementsByTagName('a');
  3. for (var i = 0; i < listCtrl.length; i++) {
  4. listCtrl[i].onmousedown = function(event) {
  5. if (!event) event = window.event;
  6. if (event.ctrlKey) {
  7. alert("Functionality for Opening links in a new tab/window is disabled !");
  8. return false;
  9. }
  10. if (event.shiftKey) {
  11. alert("Functionality for Opening links in a new tab/window is disabled !");
  12. return false;
  13. }
  14. if (event.shiftKey && event.ctrlKey) {
  15. alert("Functionality for Opening links in a new tab/window is disabled !");
  16. return false;
  17. }
  18. }
  19. }
  20. }