- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 11:25 PM
Hi,
Please let me know how can reload the form if the user clicks on the cancel button on the confirmation box ?
I have written below code but it is not working as expected. Below code is reloading the form but it is saving the changes which was entered .
function onSubmit() {
if ((g_form.getValue('state') == 17) )){
var answer = confirm('Do you want to really Reject & Close the change?');
if(answer == false){
location.reload(true);
}
}
}
Thanks & Regards,,
Shravan Kumar
Solved! Go to Solution.
- Labels:
-
Change Management
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 11:59 PM
HI shravan,
Plesae do following changes in the code
function onSubmit() {
if ((g_form.getValue('state') == 17) ))
{
var answer = confirm('Do you want to really Reject & Close the change?');
if(answer == false)
{
window.top.location.reload(true);
return false;
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 11:32 PM
Please check if this helps: Cancel confirm window after clicking cancel button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 11:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 11:45 PM
You could try to execute with: window.location.reload();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 11:41 PM
Hi Shravan,
PLZ find the code below it will work for u:-
function onSubmit() {
if ((g_form.getValue('state') == 17) ))
{
var answer = confirm('Do you want to really Reject & Close the change?');
if(answer == false)
{
window.top.location.reload(true);
}
}
}
PLZ mark this correct if it resolved your issue or feel free to ask if u still have any queries.
Regards,
Shubh