- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2016 05:29 AM
Hi,
I'm displaying dialog window with UI Page content. I want to handle event when users presses closing cross on the dialog.
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 07:49 AM
Yes, I've used:
window.addEventListener('beforeunload',function() {});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2016 06:09 AM
Hi Andrii,
I don't think you can perform any check on click of cross icon for dialog.
In the client script you can add the below code
getDialogBox();
the code within this function is as belows:
function getDialogBox()
{
showLoadingDialog();
Event.observe(window, 'load', function(){
hideLoadingDialog();
});
}
What it does is:
1) Displays dialog window
2) Observes the event and once the processing is completed it automatically closed the dialog window
Also this might be helpful GlideDialogWindow: Advanced Popups Using UI Pages - ServiceNow Guru
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 03:41 AM
Hi Andrii,
Any update on this? Can you mark my answer as correct, helpful and hit like if you were able to achieve your requirement. This helps in removing this question from unanswered list. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 07:49 AM
Yes, I've used:
window.addEventListener('beforeunload',function() {});