../../Developer.FoundationDotJS.org/wwwroot/Foundation.js
Object
Foundation
The namespace for the Foundation JavaScript framework.
Interface Summary | |
static | Class
|
static | Elemental
Methods to interact with HTML elements and events. See the Foundation.Elemental home page for more information.
|
static | Interface
|
static | Resourceful
Methods to retrieve resources. See the Foundation.Resourceful home page for more information.
|
static | Server
|
Class Summary | |
static | ClientLoader
A featherweight class to load and invoke other classes. See the Foundation.ClientLoader home page for more information.
|
static | Namespace
|
static | Point
Two dimensional point class with x and y.
|
static | Polygon
Two dimensional polygon class, implemented as an array of
Foundation.Point s, though it is not a true Array. |
static | Rectangle
Two dimensional rectangle class with x, y, width and height.
|
static | StringBuilder
A class to build strings efficiently and quickly. See the Foundation.StringBuilder home page for more information.
|
static | TMatrix
Two dimensional transformation class with a, b, c, d, tx, ty, u, v and w.
|
Function Summary | |
static |
Adds additional methods to a class or interface.
|
static |
Adds additional methods to an interface.
|
static |
Creates a new class.
|
static |
Creates a new interface.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Loads a script.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Validates the form of an email address. Allows any amount of leading and trailing whitespace and delimeters.
|
Function Detail |
static
Class
appendToClass(/*Class
*/ class, /*Collection
*/ virtualMethods, /*Collection
*/ staticMethods)
Adds additional methods to a class or interface.
Parameters:class -The class to append to.
virtualMethods -Virtual methods and properties to append, or
null
.staticMethods -(Optional) Static methods and properties to append.
static
Interface
appendToInterface(/*Interface
*/ interface, /*Collection
*/ virtualMethods, /*Collection
*/ staticMethods)
Adds additional methods to an interface.
Parameters:interface -The interface to append to.
virtualMethods -Virtual methods and properties to append, or
null
.staticMethods -(Optional) Static methods and properties to append.
static
Class
createClass(/*String
*/ classPath, /*Class
*/ parentClass, /*Class
*/ implementClass, ..., /*Function
*/ constructor, /*Collection
*/ virtualMethods, /*Collection
*/ staticMethods)
Creates a new class.
Parameters:classPath -(Optional) Fully qualified name of class. Any missing namesspaces will be created.
parentClass -(Optional) Parent Class to inherit. Pass null to implement classes but not inherit one.
implementClass -(Optional)(Repeatable) Other classes to implement static and virtual methods of.
constructor -Constructor for the new class.
virtualMethods -(Optional) Virtual methods and properties for the new class.
staticMethods -(Optional) Static methods and properties for the new class.
Example:
var MyClass=Foundation.createClass( function() { //constructor }, { //comma separated virtual methods someVirtualMethod:function(param) { } }, { //comma separated static methods someStaticMethod:function(param) { } });
static
Interface
createInterface(/*String
*/ classPath, /*Collection
*/ virtualMethods, /*Collection
*/ staticMethods)
Creates a new interface.
Parameters:classPath -(Optional) Fully qualified name of interface. Any missing namesspaces will be created.
virtualMethods -Virtual methods and properties for the new interface, or
null
.staticMethods -(Optional) Static methods and properties for the new interface.
Example:
var MyInterface=Foundation.createInterface( { //comma separated virtual methods someVirtualMethod:function(param) { } }, { //comma separated static methods someStaticMethod:function(param) { } });
static getComputedStyle(element,
property)
element -
property -
static isArray(constructor)
constructor -
static isDate(constructor)
constructor -
static jsSerialize(data,
stringBuilder)
data -
stringBuilder -
static jsSerializeProperty(stringBuilder,
dataName,
dataValue,
comma)
stringBuilder -
dataName -
dataValue -
comma -
static
Boolean
loadScript(/*String
*/ url, /*String
*/ data, /*Boolean
*/ debug, /*String
*/ catchFunction)
Loads a script.
Parameters:url -Url of script.
data -(Optional) Form encoded data to post with script request.
debug -(Optional) Show script request in popup window to examine response before executing.
catchFunction -(Optional) A function to call if an error occurs. Pass a string! Paremeters passed to error function are url, postData, script, errorMessage.
static namespace(namespace,
propertyList)
namespace -
propertyList -
static server(callback,
url,
serverFunction)
callback -
url -
serverFunction -
static serverSerialized(callback,
url,
serverFunction)
callback -
url -
serverFunction -
static serverSynchronous(url,
serverFunction)
url -
serverFunction -
static setInnerHtml(element,
html)
element -
html -
static
Boolean
validateEmailFormat(/*String
*/ emailAddress, /*Boolean
*/ allowMultiple, /*Boolean
*/ allowEmpty)
Validates the form of an email address. Allows any amount of leading and trailing whitespace and delimeters.
Parameters:emailAddress -Email address(es) to validate. Separate multiple addresses with whitespace, semi-colon(;) or comma(,).
allowMultiple -(Optional) Allow multiple addresses. Defaults to false.
allowEmpty -(Optional) Allow an empty value. Defaults to false.