mxForm

A simple class for creating HTML forms.

Summary
mxFormA simple class for creating HTML forms.
Functions
mxFormCreates a HTML table using the specified classname.
Variables
tableHolds the DOM node that represents the table.
bodyHolds the DOM node that represents the tbody (table body).
Functions
getTableReturns the table that contains this form.
addButtonsHelper method to add an OK and Cancel button using the respective functions.
addTextAdds an input for the given name, type and value and returns it.
addCheckboxAdds a checkbox for the given name and value and returns the textfield.
addTextareaAdds a textarea for the given name and value and returns the textarea.
addComboAdds a combo for the given name and returns the combo.
addOptionAdds an option for the given label to the specified combo.
addFieldAdds a new row with the name and the input field in two columns and returns the given input.

Functions

mxForm

function mxForm(className)

Creates a HTML table using the specified classname.

Variables

table

mxForm.prototype.table

Holds the DOM node that represents the table.

body

mxForm.prototype.body

Holds the DOM node that represents the tbody (table body).  New rows can be added to this object using DOM API.

Functions

getTable

mxForm.prototype.getTable = function()

Returns the table that contains this form.

addButtons

mxForm.prototype.addButtons = function(okFunct,
cancelFunct)

Helper method to add an OK and Cancel button using the respective functions.

addText

mxForm.prototype.addText = function(name,
value,
type)

Adds an input for the given name, type and value and returns it.

addCheckbox

mxForm.prototype.addCheckbox = function(name,
value)

Adds a checkbox for the given name and value and returns the textfield.

addTextarea

mxForm.prototype.addTextarea = function(name,
value,
rows)

Adds a textarea for the given name and value and returns the textarea.

addCombo

mxForm.prototype.addCombo = function(name,
isMultiSelect,
size)

Adds a combo for the given name and returns the combo.

addOption

mxForm.prototype.addOption = function(combo,
label,
value,
isSelected)

Adds an option for the given label to the specified combo.

addField

mxForm.prototype.addField = function(name,
input)

Adds a new row with the name and the input field in two columns and returns the given input.

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