---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideDialogWindow - Client (deprecated)

# GlideDialogWindow - Client (deprecated) {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

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](https://servicenow-prod.fluidtopics.net/991VdsfRLVSGIAiz0zj4Dw#c_GlideModalV3API "The GlideModal API provides methods for displaying a content overlay.") API instead.

## GlideDialogWindow - GlideDialogWindow(String id, Boolean readOnly, Number width, Number
height) {#ariaid-title2}

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.
{#r_GDW-GlideDialogWindow_S__table_dbc_4dw_mt__entry__3}

| Name | Type | Description |
|-|-|-|
| id | String | Name of the UI page to load into the dialog window. |
| readOnly | Boolean | Optional. Flag that indicates whether the dialog window is read only (true) or read/write (false). Default: false |
| width | Number | Optional. Size (in pixels) to set the width of the dialog window. |
| height | Number | Optional. Size (in pixels) to set the height of the dialog window. |
[Table 1. Parameters]

{#r_GDW-GlideDialogWindow_S__table_dbc_4dw_mt} {#r_GDW-GlideDialogWindow_S__table_ebc_4dw_mt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 2. Returns]

{#r_GDW-GlideDialogWindow_S__table_ebc_4dw_mt}  

    // 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() {#ariaid-title3}

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().
{#GlideDialogWindowadjustBodySize__table_shk_ntj_jdb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 3. Parameters]

{#GlideDialogWindowadjustBodySize__table_shk_ntj_jdb} {#GlideDialogWindowadjustBodySize__table_thk_ntj_jdb__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 4. Returns]

{#GlideDialogWindowadjustBodySize__table_thk_ntj_jdb}  

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

## GlideDialogWindow - destroy() {#ariaid-title4}

Closes the dialog window.
{#r_GDW-destroy__table_xtq_zmv_mt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 5. Parameters]

{#r_GDW-destroy__table_xtq_zmv_mt} {#r_GDW-destroy__table_ytq_zmv_mt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 6. Returns]

{#r_GDW-destroy__table_ytq_zmv_mt}  

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

## GlideDialogWindow - render() {#ariaid-title5}

Renders the dialog window.
{#r_GDW-render__table_ut3_lvv_mt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 7. Parameters]

{#r_GDW-render__table_ut3_lvv_mt} {#r_GDW-render__table_vt3_lvv_mt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 8. Returns]

{#r_GDW-render__table_vt3_lvv_mt}  

    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) {#ariaid-title6}

Sets a given window property to a specified value.
Any window property can be set using this method.
{#r_GDW-setPreference_S_S__table_st3_lvv_mt__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | The window property to set. |
| value | String | The value for the window property. |
[Table 9. Parameters]

{#r_GDW-setPreference_S_S__table_st3_lvv_mt} {#r_GDW-setPreference_S_S__table_tt3_lvv_mt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 10. Returns]

{#r_GDW-setPreference_S_S__table_tt3_lvv_mt}  

    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) {#ariaid-title7}

Sets the size of the dialog window.
If you do not pass width and height parameters, a default size is used.
{#r_GDW-setSize_N_N__table_qt3_lvv_mt__entry__3}

| Name | Type | Description |
|-|-|-|
| width | Number | The width of the dialog window. |
| height | Number | The height of the dialog window. |
[Table 11. Parameters]

{#r_GDW-setSize_N_N__table_qt3_lvv_mt} {#r_GDW-setSize_N_N__table_rt3_lvv_mt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 12. Returns]

{#r_GDW-setSize_N_N__table_rt3_lvv_mt}  

    var gdw = new GlideDialogWindow('show_list');
          gdw.setSize(750,300);

## GlideDialogWindow - setTitle(String title) {#ariaid-title8}

Sets the title of the dialog window.
{#r_GDW-setTitle_S__table_xtq_zmv_mt__entry__3}

| Name | Type | Description |
|-|-|-|
| title | String | The title for the current window. |
[Table 13. Parameters]

{#r_GDW-setTitle_S__table_xtq_zmv_mt} {#r_GDW-setTitle_S__table_ytq_zmv_mt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 14. Returns]

{#r_GDW-setTitle_S__table_ytq_zmv_mt}  

    //var gdw = new GlideDialogWindow('show_list');
          gdw.setTitle('test');


