Remove Close icon on the Dialog window

nishikanthk
Kilo Contributor

Hi all,

I have created to a UI page to display a dialog based on some conditions. can anyone tell me how to remove the Close icon on the dialog.

I tried dialog.removeCloseDecoration() ...but i'm getting an error that dialog.removeCloseDecoration is not a function.

Below is my code

var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
var dialog = new GlideModal("my_ui_page");
dialog.setTitle('Confirmation');
dialog.removeCloseDecoration(); // This is not working
dialog.setPreference("sys_id",g_form.getValue('sys_id'));
dialog.render();

 

Thanks in advance

1 ACCEPTED SOLUTION

j-mo
Tera Contributor

You need set a second parameter in your GlideModal declaration:

var gm = new GlideModal('ui_page_name',true);  <-- adding true removes the close icon

 

Here is the documentation

GlideModalV3

 

View solution in original post

6 REPLIES 6

Harsh Vardhan
Giga Patron

strange. it should work. you are on which version?

 


var dialog = new GlideDialogWindow("my_ui_page");

dialog.setTitle('Confirmation');

dialog.setSize(350,300);


dialog.setPreference("sys_id",g_form.getValue('sys_id'));

dialog.removeCloseDecoration();
dialog.render();

 

just give a try

Harsh Vardhan
Giga Patron

Hi Harshvardhan,

Thank you for the response.

 

I currently working on Jakarta. removeCloseDecoration() works if we use GlideDialogWindow. But in my case i'm using GlideModal. The look and feel of the dialog changes in GlideModal.

Thank you.

j-mo
Tera Contributor

You need set a second parameter in your GlideModal declaration:

var gm = new GlideModal('ui_page_name',true);  <-- adding true removes the close icon

 

Here is the documentation

GlideModalV3