../../Developer.FoundationDotJS.org/wwwroot/Foundation.js
Foundation
Object
All Implemented Interfaces:
Direct Known Subclasses:
All Known Implementing Classes:
Foundation.Elemental
implementsFoundation.Interface
Methods to interact with HTML elements and events. See the Foundation.Elemental home page for more information.
Note: This interface should be implemented, not extended. Do not pass as first argument to Foundation.createClass function. |
Field Summary | |
private | $Foundation_$registry_index
A unique ID assigned to this object.
|
Method Summary | |
|
|
|
|
|
Returns an ID that is unique to this object that can be used as HTML element IDs. No other instance of any class will generate the same ID even when passed the same parameter. The same instance will always generate the same ID when passed the same parameter.
|
|
Returns code that can be used in DOM events to invoke methods and properties.
|
static |
|
|
Returns the HTML element that is unique to this object.
|
|
|
|
Returns the HTML elements that are unique to this object.
|
static |
|
static |
|
|
|
|
|
static |
|
Methods inherited from Foundation.Interface |
getTypePath |
Field Detail |
private Number
$Foundation_$registry_index
A unique ID assigned to this object.
Method Detail |
attachEvent(element,
eventName,
code,
delayed,
disable)
element -
eventName -
code -
delayed -
disable -
detachEvent(element,
eventName,
f)
element -
eventName -
f -
String
elementId(/*String
*/ id,
/*Number
*/ index)
Returns an ID that is unique to this object that can be used as HTML element IDs. No other instance of any class will generate the same ID even when passed the same parameter. The same instance will always generate the same ID when passed the same parameter.
Parameters:id -The ID unique in the class to append to the globaly unique ID.
index -(Optional) An optional index to append, for instance, when using for a radio button element.
Example:
// The following button will call the update method of the object when clicked. html+="<input type=button id=\""+this.elementId("uniqueButton")+"\" value=\"Update\" onclick=\""+this.event("update()")+"\">";See Also:
String
event(/*String
*/ code,
/*Boolean
*/ delayed,
/*Boolean
*/ disabled)
Returns code that can be used in DOM events to invoke methods and properties.
Parameters:code -The code of this object to be executed. If no parameters passed, returns the fully qualified object (to this).
delayed -(Optional) Delay the event using window.setTimeout. Set to true if the HTML element invoking the event will be destroyed during the event.
disabled -(Optional) If the event is delayed, disable the HTML element to prevent accidental duplicate events (like a button being pushed twice).
Example:
// The following button will call the update method of the object when clicked. html+="<input type=button value=\"Update\" onclick=\""+this.event("update()")+"\">";
static getById(id,
decendantsToo)
id -
decendantsToo -
Element
getElement(/*String
*/ id,
/*Number
*/ index)
Returns the HTML element that is unique to this object.
Parameters:id -The ID unique in the class.
index -(Optional) An optional index, use if an index was passed to
elementId
.Example:
// Get the button that was created using the this.elementId("uniqueButton") method. var button=this.getElement("uniqueButton");See Also:
getElementValue(id,
defaultValue)
id -
defaultValue -
Array
getElements(/*String
*/ name,
/*Number
*/ index)
Returns the HTML elements that are unique to this object.
Parameters:name -The name unique in the class.
index -(Optional) An optional index, use if an index was passed to
elementId
.Example:
// Get the button that was created using the this.elementId("uniqueButton") method. var button=this.getElement("uniqueButton");See Also:
static getFirst(decendantsToo)
decendantsToo -
static getNext(o,
decendantsToo)
o -
decendantsToo -
parseElementId(id)
id -
processHtml(html)
html -
static processHtml(html)
html -