"Do not spoil what you have by desiring what you have not; but remember that what you now have was once among the things you only hoped for." -Epicurus
JavaScript Manual: DLSupport.Form

Method: addParameter

Since: 1.1

Parameters:

 Variable
Type
Description
 parameters
object
The parameter object.
 element
object
The element to try to add to the parameters object.
 is_array
boolean
Whether or not the value should be considered as an array.

Description:

Add the given element into the given parameters object based on some preset rules.

Method: disableSubmitFields

Since: 1.1

Parameters:

 Variable
Type
Description
 form
object
The form for which all of its submit fields will be disabled.

Description:

Disable all of the submit fields for the given form.

Method: enableSubmitFields

Since: 1.1

Parameters:

 Variable
Type
Description
 form
object
The form for which all of its submit fields will be enabled.

Description:

Enable all of the submit fields for the given form.

Method: fieldCount

Since: 1.1

Parameters:

 Variable
Type
Description
 form
object
The form for which the data is to be retrieved from.

Returns:

 Type
Description
 object
An associative array with the field name as the property and the number of fields with the same name as the value.

Description:

Retrieve an object with its property names being all the named fields of the given form and its value being how many fields have that name.

Method: submitValue

Since: 1.1

Updated: 1.3

Parameters:

 Variable
Type
Description
 element
object
The element that contains the submit value. Note that the element must be a DOM element with the property "form" which points to the form for which the element belongs to.

Returns:

 Type
Description
 boolean
Returns true if successful, false, otherwise.

Description:

Set the value of the given element as the submit value for the element's form. This is useful for forms to be sent via AJAX that has multiple submit buttons.

As of 1.3, the return value was added.

Method: toQueryString

Since: 1.1

Parameters:

 Variable
Type
Description
 form
object
The form for which the data is to be retreived from.

Returns:

 Type
Description
 string
The given form data as a query string.

Description:

Convert the given form data to a query string. Although this will handle fields that can have multiple values like checkboxes, make sure you name it appropriately however.

User Comments

  • Posted By
  • Posted On
  •  
  • Comment

Comment Submission

Found something wrong with the information or you just want to speak your mind? Send us a comment.

  • Nickname:
  • Comment:
  • Captcha:
  • Captcha
This page was last modified on: May 27, 2008.