GlideDialogWindow.get().destroy() is not working in UI Page

Madankumar N1
Tera Contributor

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

 

 

 

 

8 REPLIES 8

tejaswimaganty
Mega Contributor

you have to create a different function for cancel and ok buttons

example:

function cancel() {
var c = gel('cancelled');
c.value = "true";
GlideDialogWindow.get().destroy();
}

Hi Tejaswi

var c = gel('cancelled')

cancelled is id of button right?

No luck i tried this scenario

hi Madan,

<g:ui_form>
<input type="hidden" id="cancelled" name="cancelled" value="false"/>

<tr id="dialogbuttons">
<td colspan="3" align="right" style="padding-right:10px;">
<g:dialog_buttons_ok_cancel ok="return actionOK();" cancel="cancel();"/>
</td>
</tr>

this will be your UI page script. hope this should work