Force Reload Without Confirmation

Wasdom_Kung
Tera Guru

Hello!

 

 


I have created a client script that when an item is submitted/added to cart, will reload the current page, however I noticed that the browser will had a reload/cancel popup.

 

Is there a way to force this refresh without input from a user?

 

This is using the following line: 

location.reload(true);

 

5 REPLIES 5

Runjay Patel
Giga Sage

Hi @Wasdom_Kung ,

 

Use below code in your client script.

g_form.modified = false;
 location.reload();

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------