Skip to main content
Version: 11.2

dialogclose

note

This article is about the dialogclose UDB event handler.

dialogclose

The dialogclose event may be called from web pages developed in Web Designer and processed by a USoft page engine service.

EventApplies toOccurs when
dialogcloseDialog controlsRight after a dialog has closed

This event is triggered on the dialog's own <dialog> element right after the dialog has been closed (its close() method has already run), and it applies to the same kinds of dialog described for dialogopen: a custom Web Designer dialog closed through DialogControl.methods().close() (controls/dialog-control.js), and a lookup, confirmation, or other data-input dialog closed through DataInputControl.event() (controls/data-input-control.js). Both classes are subclasses of UdbControl.

Purpose

You can use this event to run cleanup code once a dialog has actually disappeared, for example to release resources, restore page state, or trigger a follow-up action now that the dialog is gone.

How to use

Find or create an Event Listener object with Event Type = dialogclose. Event Listeners are in the Web Designer Controls catalog:

Insert the event listener into the dialog control. Insert a callClientScript action into the event listener. Use this action's Script property to code the behaviour that you want to see when the event occurs.

You are implicitly associating the event with an event handler function. This function has an options parameter. For available options, see the Options section at the end of this help topic:

function(*evt*, *options*){ ... }

Or you can create the event handler more explicitly by attaching a jQuery handler on the control's element.

No options object is passed to the event handler function by any of the current triggering call sites, so the event is a plain notification that the dialog has closed. The underlying jQuery-style usdialog('close', value) method (used by system dialogs, usoft.module.controls.js) technically forwards an optional caller-supplied value as event data if one is passed to it, but none of the standard USoft dialog call sites currently supply such a value.