o.wwModalDialog.createDialog(Id,Width,OkCaption,CancelCaption,DialogHandler)
Width
The width of the dialog.
OkCaption
The text for the OK button.
CancelCaption
Optional caption for the Cancel button. If not specified the Cancel button is not displayed
DialogHandler
An optional client function handler that receives two parameters: 0 or 1 for cancel/ok and a reference to the button object that was clicked.
<script> function MessageBox(Message,Title) { // *** Create here inline or make this ref global var Mbox = wwModalDialog.createDialog("Mbox",500,"Done","Cancel",MBox_Callback); Mbox.showDialog(Message.htmlEncode(),Title.htmlEncode()); } function MBox_Callback(Result,Button) { if (Result == 1) alert("Ok. Button Text: " + Button.value); else alert("Cancel. Button Text: " + Button.value); } </script>// *** then from anywhere in the application: MessageBox("Hello World","Application Message");