- 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:52 PM
Thanks Shubh & Shishir,
I have tried the below
window.top.location.reload(true) - It is reloading the form but it is saving the entered changes.
window.location.reload(); - It is also reloading the form and saving the record with entered changes
User changes should not saved after reloading the form. Please let me know how can achieve this
- 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:59 PM
PLZ mark this correct if it resolved your issue or feel free to ask if u still have any queries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 12:05 AM
Thanks Shubh,
It is worked for me .. ☺
Making your answer as correct
Regards,
Shravan Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 12:23 AM
Hi Shravan,
My pleasure....:)
Regards,
Shubh