GlideDialogWindow - Client

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: GlideDialogWindow does not function with List v3. Either use List v2 or the GlidModalV3 API.

GlideDialogWindow - destroy()

Closes the dialog window.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
TypeDescription
void

//Destroy the current dialog window.
      GlideDialogWindow.get().destroy();

GlideDialogWindow - GlideDialogWindow(StringĀ id)

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.

Table 3. Parameters
Name Type Description
id String The name of the UI page to load into the dialog window.
Table 4. Returns
TypeDescription
void
var gdw = new GlideDialogWindow('show_list');

GlideDialogWindow - render()

Renders the dialog window.

Table 5. Parameters
Name Type Description
None
Table 6. Returns
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.

Table 7. Parameters
Name Type Description
name String The window property to set.
value String The value for the window property.
Table 8. Returns
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.

Table 9. Parameters
Name Type Description
width Number The width of the dialog window.
height Number The height of the dialog window.
Table 10. Returns
TypeDescription
void
var gdw = new GlideDialogWindow('show_list');
      gdw.setSize(750,300);

GlideDialogWindow - setTitle(String title)

Sets the title of the dialog window.

Table 11. Parameters
Name Type Description
title String The title for the current window.
Table 12. Returns
TypeDescription
void
//var gdw = new GlideDialogWindow('show_list');
      gdw.setTitle('test');