Prevent "Leave Site? Changes you made may not be saved." popup while submitting the Catalog form

vallamreddyvenu
Giga Contributor

Hi there,

We have recently moved to kingston. We have catalog form that submits data to a table. We are submitting the data to a table and then redirecting the user using "window.location.href". Before we upgrade to kingston, it was submitting the data to table and redirecting the user to the URL. But now after upgrade, when we click on submit button, the below popup is being displayed.

find_real_file.png 

The above popup is from IE. In chrome, a popoup with the text ""Leave Site? Changes you made may not be saved.".  Until, we click on "Leave this page", the redirection is not happening. But the form data has already been saved to table. If i can bypass the above popup, i can redirect the user just by click on submit button. Can somebody please help us on how to bypass these popups and redirect the user to the URL specified. 

Thanks,

Venu

6 REPLIES 6

You can also try this in your script.

window.onbeforeunload = function () {
  // blank function do nothing
}

AmanG
ServiceNow Employee
ServiceNow Employee

You can also turn it off for all the websites, this is a browser setting and not an exclusive ServiceNow setting - 

 

  • Close Internet Explorer browser
  • Right-click on Start
  • Left-click on Run
  • In the Run dialog type INETCPL.CPL then click OK
  • This will open your Internet Properties window. In this window left-click the Security tab
  • Next, Left-click on the Custom level button
  • This will open the Security Settings - Internet Zone window. 

    In this window scroll down towards bottom and locate Active scripting

    Check
     the Disable option