This is a also a simple dialog but can be used to alert the user on the action done. This dialog accepts the property driven text or plain text as error message with the Ok button. The
The typical structure of the message dialog is:
Code Block | ||
---|---|---|
| ||
var Message_Win = new canvas.Dialog({title : 'Error', |
...
dialogType : 'ERROR', |
...
message : 'Detailed error message', okHandler : function () |
...
{ //Your OK action goes here |
...
} |
...
}); |
Refer the following sample dialog for its usage:
Code Block | ||
---|---|---|
| ||
var AlertExistsWin = new canvas.Dialog({title : 'Error', |
...
dialogType : 'ERROR', |
...
message : 'Alert Id exists already', okHandler : function () |
...
{ fm.setFocus("TXT_ALERT_ID"); AlertExistsWin .close(); |
...
} |
...
}); |