Reference - SS.core - Core Functions
Spiderscript is built upon these core functions. The names of the functions are abbreviated to help keep the JavaScript file size down to a minimum.
Functions:
$ac
Append child to parent. Appends a child node to the parent node if it supports this functionality
p : {DOM Node} - Parent Node
c : {DOM Node} - Child Node
null
v1.0.0.20080527
[Top]
$c
Create Element.
Creates a HTML element as specified in the tag command. Similar to document.CreateElement however, this function will reuse elements tags which have been destroyed with $d function.
Element created is auto-assigned an Id if one is not specified in the function call.
Tag Name : {String} (optional - defaults to DIV)
Class Name : {String} (optional - defaults to "")
Id : {String} (optional - defaults to next available Id Number)
Object.tagName: {String} (optional - defaults to DIV)
Object.className : {String} (optional - defaults to "")
Object.id {String} (optional - defaults to next available Id Number)
DOM Node
v1.0.0.20080527
[Top]
$cc
Char Code. Get char code from the specified event.
e : {Event}
c - char code. 0 if unknown
v1.0.1.20080729
[Top]
$ci
clearInterval. Javascript function clearInterval().
i : {Number} - Pointer returned by setInterval function
null
v1.0.0.20080527
[Top]
$cl
Get / Set ClassName
Returns the ClassName attribute of the element. If n value
is specified, the elements ClassName attribute is updated to reflect this change and the
new value is returned
l : {DOM Node} - Element Node
n : {String} - Style Name
{String}
v1.0.1.20080729
[Top]
$cn
Get Children Nodes
Returns list of child nodes for the element
l : {DOM Node} - Element Node
{DOM Node List}, null
v1.0.1.20080729
[Top]
$ct
clearTimeout. Javascript function clearTimeout().
i : {Number} - Pointer returned by setTimeout function
null
v1.0.0.20080527
[Top]
$ctn
Create Text Node.
Javascript function document.createTextNode.
t : {String} - Text to insert into the text node
n - {DOM Text Node}
v1.0.0.20080527
[Top]
$d
Destroy Element. Destroys the document object node and child nodes within it making them available for reuse
l : {DOM Node}
null
v1.0.0.20080527
[Top]
$dc
Destroy Child Elements. Destroys all child nodes within the element passed
l : {DOM Node}
null
v1.0.0.20080527
[Top]
$e
Get Event. Takes event and returns it in a cross-browser supported way. For example, returns window.event if running in Internet Explorer else returns event passed.
e : {Event}
e : {Event}
v1.0.0.20080527
[Top]
$ec
Event Cancel. Cancel the event from propagating.
e : {Event}
null
v1.0.0.20080527
[Top]
$g
Get DOM Element.
Returns an element from the DOM based on the Id provided.
Support is provided for browsers that rename Id's containing ':'.
Support is provided for browsers that rename Id's containing ':'.
id : {String}
{DOM Node},null
v1.0.0.20080527
[Top]
$ga
Get Attribute. Get attribute from DOM element
l : {DOM Node}
a : {String} Attribute name.
{String}
v1.0.0.20080527
[Top]
$gc
Get Web Control.
Returns Spiderscript web control object.
id : {String}
{Object},null
v1.0.0.20080527
[Top]
$hcn
Has Child Nodes
Returns true if the element has chilren nodes attached
l : {DOM Node} - Element Node
{Boolean}
v1.0.1.20080729
[Top]
$il
In List. Checks to see if the value (v) is in the list (l) delimited by (d) returns true if the value is found in the list. Case sensitive. Default delimiter is d
l : {String}
v : {String}
d : {String}
null
v1.0.0.20080527
[Top]
$iln
In List No Case. Checks to see if the value (v) is in the list (l) delimited by (d) returns true if the value is found in the list. Case insensitive. Default delimiter is d
l : {String}
v : {String}
d : {String}
null
v1.0.0.20080527
[Top]
$isa
Is Array. Returns true if the object is an array.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$isb
Is Boolean. Returns true if the object is a boolean
o : Object
{Boolean}
v1.0.0.20080527
[Top]
$isd
Is Object Defined. Returns true if the object is defined else returns false.
o : Object
{Boolean}
v1.0.0.20080527
[Top]
$isdc
Is Descendant.
Returns true if the element c is a descendant of root element r i.e. is a child or child child etc..
r : {DOM Node} - Root Element
c : {DOM Node} - Child / Descendant Element
{Boolean}
v1.0.0.20080527
[Top]
$ise
Is Empty. Returns true if the object is empty i.e. equals null, is not defined, or is an empty string
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$isf
Is Function. Returns true if the parameter passed is a function, else returns false.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$isn
Is Number. Returns true if the parameter passed is a number.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$iso
Is Object. Returns true if the parameter passed is an object. Functions are considered objects.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$iss
Is String. Returns true if the parameter passed is a string.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$isu
Is Object Undefined. Returns true if the object is not defined else returns false.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$lc
Lower Case. Changes string to lower case.
s : {String}
{String}
v1.0.0.20080527
[Top]
$ln
Get Length
Returns the length value of the specified object. Defaults to 0 if .length is undefiend.
o : {Object}
int
v1.0.1.20080729
[Top]
$n
Number. Converts input into Number. Same as Number();
o : {Object}
{Number}
v1.0.0.20080527
[Top]
$nid
New Id. Returns the next available Id that can be used for an element. Id's are numerical numbers
None
{String}
v1.0.0.20080527
[Top]
$pn
Get Parent Node
Returns the parament node of the element
l : {DOM Node} - Element Node
{DOM Node}, null
v1.0.1.20080729
[Top]
$psb
Parse String to Boolean. Converts a string containing a positive message e.g. yes,1,true,on into a boolean. Defaults to false
s : {String}
{Boolean}
v1.0.0.20080527
[Top]
$rand
Random Whole Number Returns a random whole number between 0 and m.
m : {Number} - Maximum number
{Number}
v1.0.0.20080527
[Top]
$rc
Removes child from parent. Removes a child node from the parent node if it supports this functionality
p : {DOM Node} - Parent Node
c : {DOM Node} - Child Node
null
v1.0.0.20080527
[Top]
$rnd
Round Number Rounds to the nearest whole number. See Javascript function Math.round
n : {Number} - Number to round
{Number}
v1.0.0.20080527
[Top]
$rp
Removes from parent Removes the node from the parent node if it supports this functionality
l : {DOM Node} - Element Node
null
v1.0.0.20080527
[Top]
$sa
Set Attribute. Sets attribute in the DOM element
l : {DOM Node}
a : {String} Attribute name.
v : {String} Value.
{String}
v1.0.0.20080527
[Top]
$si
setInterval. Javascript setInverval function
s: {String} - String function to be evaluated before executing
t : {Number} - Interval in milliseconds
s: {String} - Function to execute
t : {Number} - Interval in milliseconds
null
v1.0.0.20080527
[Top]
$st
setTimeout. Javascript setTimeout function
s: {String} - String function to be evaluated before executing
t : {Number} - Delay in milliseconds
s: {String} - Function to execute
t : {Number} - Delay in milliseconds
null
v1.0.0.20080527
[Top]
$ta
To Array.
Converts object to an array. if null or undefined are passed, an empty array returned. If the object is already an array, it is returned without any changes.
o : {Object}
{Array}
v1.0.0.20080527
[Top]
$tb
To Boolean.
Converts object to a boolean value. If null or undefined values are passed, false is returned.
o : {Object}
{Boolean}
v1.0.0.20080527
[Top]
$trim
Trim Spaces.
Removes leading and trailing spaces from input string
s - {String}
s - {String}
v1.0.0.20080625
[Top]
$ts
To String.
Converts object to string if supports toString() function.
o : {Object}
{String}
v1.0.0.20080527
[Top]
$uc
Upper Case. Changes string to upper case.
s : {String}
{String}
v1.0.0.20080527
[Top]
$x2o
XML To Object. Converts an XML document into a Javascript Object
XML Document
{Object}
v1.0.0.20080527
[Top]