wwModalDialog.dialogHandler

Optional handler function pointer that is called when you click on the Ok or Cancel button. A single parameter is passed: 1-Ok, 0-Cancel

The handler fires prior to the dialog being closed, but you cannot stop the dialog from being closed unless you use explicit code (calling hideDialog or showDialog with a setTimeout() perhaps).

o.wwModalDialog.dialogHandler

Example

<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) { if (Result == 1) alert("Ok"); else alert("Cancel"); } </script>

See also:

Class wwModalDialog


  Last Updated: 1/18/2007 | © West Wind Technologies, 2008