Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

GlideDialogWindow- Client (deprecated)

The GlideDialogWindow API provides methods for displaying a dialog in the current window and frame.

Use these methods in scripts anywhere that you can use a client-side JavaScript. These methods are most often called from a UI action with the Client check box selected.

Note: This API has been deprecated, use the GlideModal API instead.

Parent Topic:Client API reference

GlideDialogWindow - GlideDialogWindow(String id, Boolean readOnly, Number width, Number height)

Provides methods for displaying a dialog in the current window and frame.

Use these methods in scripts anywhere that you can use a client-side JavaScript. These methods are most often called from a UI Action with the Client check box selected.

NameTypeDescription
idStringName of the UI page to load into the dialog window.
readOnlyBooleanOptional. Flag that indicates whether the dialog window is read only (true) or read/write (false). Default: false
widthNumberOptional. Size (in pixels) to set the width of the dialog window.
heightNumberOptional. Size (in pixels) to set the height of the dialog window.
TypeDescription
void 
// Creates a dialog window
var gdw = new GlideDialogWindow('show_list');

// Creates a read-only dialog window
var gdw = new GlideDialogWindow('show_list', true);

// Creates a dialog window that is 400 pixels wide
var gdw = new GlideDialogWindow('show_list', false, 400); 

// Creates a dialog window that is 400 pixels wide and 200 pixels tall
var gdw = new GlideDialogWindow('show_list', false, 400, 200); 

GlideDialogWindow - adjustBodySize()

Adjusts the body height of a dialog window to be the window height minus the header height.

You typically call this method after calling GlideDialogWindow - setSize().

NameTypeDescription
None  
TypeDescription
void 
var gdw = new GlideDialogWindow('show_list');
      gdw.setTitle('Test');
      gdw.setSize(750,300);
      gdw.adjustBodySize();
      gdw.render();

GlideDialogWindow - destroy()

Closes the dialog window.

NameTypeDescription
None  
TypeDescription
void 
//Destroy the current dialog window.
      GlideDialogWindow.get().destroy();

GlideDialogWindow - render()

Renders the dialog window.

NameTypeDescription
None  
TypeDescription
void 
var gdw = new GlideDialogWindow('show_list');
      gdw.setTitle('Test');
      gdw.setSize(750,300);
      gdw.setPreference('table', 'u_test_list');
      gdw.setPreference('title', 'A New Title');
      gdw.render();

GlideDialogWindow - setPreference(String name, String value)

Sets a given window property to a specified value.

Any window property can be set using this method.

NameTypeDescription
nameStringThe window property to set.
valueStringThe value for the window property.
TypeDescription
void 
var gdw = new GlideDialogWindow('show_list');
      gdw.setTitle('Test');
      gdw.setSize(750,300);
      gdw.setPreference('table', 'u_test_list');
      gdw.setPreference('title', 'A New Title');

GlideDialogWindow - setSize(Number width, Number height)

Sets the size of the dialog window.

If you do not pass width and height parameters, a default size is used.

NameTypeDescription
widthNumberThe width of the dialog window.
heightNumberThe height of the dialog window.
TypeDescription
void 
var gdw = new GlideDialogWindow('show_list');
      gdw.setSize(750,300);

GlideDialogWindow - setTitle(String title)

Sets the title of the dialog window.

NameTypeDescription
titleStringThe title for the current window.
TypeDescription
void 
//var gdw = new GlideDialogWindow('show_list');
      gdw.setTitle('test');