message
(mess, options)domain: client
language: javascript
class AbstractItem
Use message method to create a modal form.
The mess parameter specifies the text or html content that will appear in the body of the form.
The options parameter is an object with the following attrubutes:
The method returns a jquery object of the form. To programmatically close the form pass this object to hide_message method.
The following code will create a yes-no-cancel dialog:
function yes_no_cancel(item, mess, yesCallback, noCallback, cancelCallback) {
var buttons = {
Yes: yesCallback,
No: noCallback,
Cancel: cancelCallback
};
item.message(mess, {buttons: buttons, margin: "20px",
text_center: true, width: 500, center_buttons: true});
}
task.message(
'<a href="http://jam-py.com/" target="_blank"><h3>Jam.py</h3></a>' +
'<h3>Demo application</h3>' +
' with <a href="http://chinookdatabase.codeplex.com/" target="_blank">Chinook Database</a>' +
'<p>by Andrew Yushev</p>' +
'<p>2015</p>',
{title: 'Jam.py framework', margin: 0, text_center: true, buttons: {"OK": undefined},
center_buttons: true}
);
the result of the code above will be: