This document outlines the basic API of the Dialog widget. Dialog boxes are DIV Elements with a border and are placed at a higher z-index. There is also a basic Form API within the Dialog boxes
To create a basic Dialog box, specify its width, height and title. Optionally, content is a list of form input widgets. For more info, see make_body
content is the list of form input widgets that are to be created. The structure of the content list is a list-in-a-list.
Field widget types are:
The widgets are declared as [type, label, comment or HTML content]
Example showing creation of a Email Dialog:
var d = new Dialog(440, 440, "Send Email");
d.make_body([
['Data','To','Example: abc@hotmail.com, xyz@yahoo.com']
,['Select','Format']
,['Data','Subject']
,['Data','From','Optional']
,['Check','Send With Attachments','Will send all attached documents (if any)']
,['Text','Message']
,['Button','Send',email_go]]
);
// Reference to a form widget
var emailfrom = d.widgets['From'].value;
// show the dialog
d.show()