psReturnMessage - cWebModalDialog

User-defined message sent by a modal dialog to its invoking object when the dialog closes

Type: Property (Web Property)

Access: Read/Write

Data Type: String

Parameters: None

 { WebProperty=Client }
 Property String psReturnMessage

Web Property Read Access: WebGet psReturnMessage to StringVariable
Web Property Write Access: WebSet psReturnMessage to StringVariable/Value

Read Access: Get psReturnMessage to StringVariable
Write Access: Set psReturnMessage to StringVariable/Value


By default, when a modal dialog is closed, it sends the OnCloseModalDialog callback message to the invoking object (i.e. the object that sent the Popup message to the modal dialog).

Set psReturnMessage to the name of an alternative callback message to send instead of OnCloseModalDialog when the modal dialog is closed.

The callback message must declare a single Handle parameter, i.e. the same parameter list as OnCloseModalDialog. This parameter will receive the object handle of the modal dialog that sends the callback message. As a security feature, the callback message must also be published via the WebPublishProcedure command, otherwise it will be rejected by the web application's security system.


Procedure MyCallback Handle hoDialog
WebPublishProcedure MyCallback


The following example demonstrates a button object that invokes a modal dialog. The default callback message has been changed to "OnCloseDialogA".

Object oShowDialogA is a cWebButton
    Set psCaption to "Dialog A"

    Procedure OnClick
        WebSet psReturnMessage of oDialogA to "OnCloseDialogA"
        Send Popup to oDialogA Self

    Procedure OnCloseDialogA Handle hoModalDialog
    WebPublishProcedure OnCloseDialogA

About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.
See Also

psReturnObject | pbServerOnEscape