GlideDialogWindow.get().destroy() is not working in UI Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2019 11:04 PM
Hi Team
am not able destroy ui page in my requirement am using this function to destroy ui page"GlideDialogWindow.get().destroy();" but is working remaining places in my function only it is not working;
am using UI page1 in UI Action
in UI page1 i have button called validated it will open another page UI Page2.
UI Page2 i have two buttons Yes or No
if i click no it has close UI Page2 and it has to open another UI Page3
It is opening UI Page3 but UI Page2 is not closing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2019 12:44 AM
Hi Madan,
Can you share your code?
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
‎08-06-2019 01:34 AM
UI Page Code:
<input type='hidden' name='change_number' id='change_number' value="${changeNumber}"/>
<p><b>Do you want to background processing?</b></p>
<br/>
<table>
<tr>
<td colspan="2" style="padding-top:20px;">
<button class="btn btn-primary" onclick="backgroundProcessing()" style="width:80px;">Yes</button>
<button class="btn btn-default" onclick="uiProcessing()" style="width:80px;margin-left:20px;">No</button>
</td>
</tr>
</table>
UI Page Client script :
function uiProcessing(){
GlideDialogWindow.get().destroy();
var change_request=gel('change_number').value;
var loadingDialog = new GlideDialogWindow("dialog_loading", true);
loadingDialog.setPreference('table', 'loading');
loadingDialog.setTitle('Loading...'); //Set the loading dialog title here...
loadingDialog.render();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2019 02:18 AM
Hi Madan,
Did you try adding an alert whether the function is getting called or not?
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
‎08-06-2019 02:28 AM
Yes
alert is coming another ui Page3 is also opening but my current ui page is not destroying which i have buttons