Spiderscript Home
Class Index | File Index

Classes




Spiderscript Home
Class Index | File Index

Classes




Namespace SS.htmlextension

Extends HTML element functionality
Defined in: SS.htmlextension.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
SS.htmlextension.addElement(l, ft)
Add element of interest for future use e.g.
<static>  
SS.htmlextension.forminit()
Attaches a function to the form onsubmit event to perform validation before the page is submitted.
<static>  
SS.htmlextension.getElementsByGroupName(g)
Gets elements where the groupname attribute matches the sought after groupname (n).
<static>  
SS.htmlextension.getGroupValues(n)
Returns the values of elements which have been assigned a groupname.
<static>  
SS.htmlextension.inputvalidation(l, ft)
Validates the HTML Input / Select Element.
<static>  
SS.htmlextension.isvalid(l)
Extend functionality for the HTML textarea by adding support for the maxlength attribute.
<static>  
SS.htmlextension.textarea(l)
Extend functionality for the HTML textarea by adding support for the maxlength attribute and validation.
<static>  
SS.htmlextension.validate(g)
Validates all the fields within the context of the current form or specified group name
Namespace Detail
SS.htmlextension
Method Detail
<static> SS.htmlextension.addElement(l, ft)
Add element of interest for future use e.g. getting values from groupname.
Parameters:
{HTMLElement} l
Element to add
{Boolean} ft
First time. Flag to indicate that this has been called as part of the
initial loading process. (Optional).
Returns:
null

<static> SS.htmlextension.forminit()
Attaches a function to the form onsubmit event to perform validation before the page is submitted.

<static> {Array} SS.htmlextension.getElementsByGroupName(g)
Gets elements where the groupname attribute matches the sought after groupname (n). A groupname attribute can contain more than one group name by using a comma seperated list.
Parameters:
{String} g
Group Name. Name of the group of elements to return.
Returns:
{Array} Array of {HTMLElement} objects, else empty array.

<static> {Array} SS.htmlextension.getGroupValues(n)
Returns the values of elements which have been assigned a groupname.
Parameters:
{String} n
Group Name. Name of the group of element values to return.
Returns:
{Array} Array of objects {HTMLElement.id : HTMLElement.value}

<static> {Boolean} SS.htmlextension.inputvalidation(l, ft)
Validates the HTML Input / Select Element. The validation cirteria is defined by the elements attributes. Attributes: validate = [int,decimal,reg ex,date,time] mandatory = [yes,no,true,false,1,0,y,n] errortext = Message to output when in error. onerror - function called when there has been an error
Parameters:
{HTMLElement} l
Input element to be validated.
ft
Returns:
{Boolean} Flag indicating that the input is valid. true = valid, faled = invalid.

<static> SS.htmlextension.isvalid(l)
Extend functionality for the HTML textarea by adding support for the maxlength attribute.
Parameters:
{HTMLElement} l
Text area element.

<static> {Boolean} SS.htmlextension.textarea(l)
Extend functionality for the HTML textarea by adding support for the maxlength attribute and validation.
Parameters:
{HTMLElement} l
Text area element.
Returns:
{Boolean} True if validation is enabled.

<static> {Boolean} SS.htmlextension.validate(g)
Validates all the fields within the context of the current form or specified group name
Parameters:
{String} g
Group Name (optional)
Returns:
{Boolean} True if all fields in the form / group validate correctly, else false if one or more fields are in error.

Documentation generated by JsDoc Toolkit 2.1.0 on Wed Sep 30 2009 09:31:13 GMT+0100 (BST)