Force Reload Without Confirmation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 02:49 AM - edited 11-28-2024 02:50 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:11 AM
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
-------------------------------------------------------------------------