A simple class for creating HTML forms.
mxForm | A simple class for creating HTML forms. |
Functions | |
mxForm | Creates a HTML table using the specified classname. |
Variables | |
table | Holds the DOM node that represents the table. |
body | Holds the DOM node that represents the tbody (table body). |
Functions | |
getTable | Returns the table that contains this form. |
addButtons | Helper method to add an OK and Cancel button using the respective functions. |
addText | Adds a textfield for the given name and value and returns the textfield. |
addCheckbox | Adds a checkbox for the given name and value and returns the textfield. |
addTextarea | Adds a textarea for the given name and value and returns the textarea. |
addCombo | Adds a combo for the given name and returns the combo. |
addOption | Adds an option for the given label to the specified combo. |
addField | Adds a new row with the name and the input field in two columns and returns the given input. |
Creates a HTML table using the specified classname.
function mxForm( className )
Holds the DOM node that represents the table.
mxForm.prototype.table
Holds the DOM node that represents the tbody (table body).
mxForm.prototype.body
Returns the table that contains this form.
mxForm.prototype.getTable = function()
Helper method to add an OK and Cancel button using the respective functions.
mxForm.prototype.addButtons = function( okFunct, cancelFunct )
Adds a textfield for the given name and value and returns the textfield.
mxForm.prototype.addText = function( name, value )
Adds a checkbox for the given name and value and returns the textfield.
mxForm.prototype.addCheckbox = function( name, value )
Adds a textarea for the given name and value and returns the textarea.
mxForm.prototype.addTextarea = function( name, value, rows )
Adds a combo for the given name and returns the combo.
mxForm.prototype.addCombo = function( name, isMultiSelect, size )
Adds an option for the given label to the specified combo.
mxForm.prototype.addOption = function( combo, label, value, isSelected )
Adds a new row with the name and the input field in two columns and returns the given input.
mxForm.prototype.addField = function( name, input )