Prototype 1v5 Javascript Library

ADVERTISEMENT

Prototype JavaScript Library 1.5.0
Utility Methods
String
Enumerable
Ajax
Element
Form
(singleton)
Handles enumeration
XMLHttpRequest Interface
Extends DOM nodes via $() and $$() (if
Extends FORM nodes via $() and $$() (if
interpret(value)
$(s|el [,s|el,..])
executed as Singleton, element is
executed as Singleton, element is
each(f)
getTransport()
gsub(pattern, f)
Takes one or more element ID’s or
first argument)
first argument)
elements and mixes in Element methods
eachSlice(n, f)
activeRequestCount
sub(pattern, f, count n)
reset(frm)
visible()
all(f)
$$(cssSelectors s[,s,s..])
scan(pattern, f)
serializeElements(els)
toggle()
any(f)
Returns array of elements using
Ajax.Responders
extends
truncate(length, s)
serialize()
hide()
CSS Selectors
collect(f)
Enumerable (singleton)
strip()
getElements()
show()
$A(a)
detect(f)
stripTags()
Responds to Ajax events
getInputs(type s, name s)
remove()
Returns array with Array and
findAll(f)
stripScripts()
responders
Enumerable methods
disable()
update(html s)
grep(pattern, f)
extractScripts()
$H(o)
register(o)
enable()
replace(html s)
include(o)
evalScripts()
unregister(o)
Returns array with Hash and
findFirstElement()
inspect()
Enumerable methods
inGroupsOf(n, fillWith)
escapeHTML()
dispatch(s, req, transport, json)
focusFirstElement()
recursivelyCollect(property s)
$w(s)
inject(memo, f)
unescapeHTML()
focus()
ancestors()
Splits string on spaces
invoke(method s)
toQueryParams(separator)
select()
Ajax.Request
descendants()
extends .Base
Try.these(f[,f,f..])
max(f)
toArray()
serialize()
immediateDescendants()
Exits after first successful function
Processes an Ajax request
min(f)
succ()
getValue()
previousSiblings()
initialize(url s, options o)
$F = Form.Element.getValue()
partition(f)
camelize()
clear()
nextSiblings()
success()
pluck(property s)
$R = new ObjectRange
capitalize()
present()
match(selector)
getHeader(s)
reject(f)
underscore()
activate()
up(expression, index)
sortBy(f)
Prototype
dasherize()
disable()
down(expression, index)
toArray()
Ajax.Updater
inspect(dblquotes b)
extends .Base
enable()
previous(expression, index)
Version
zip(a[,a,a..][,f])
and .Request
parseQuery = toQueryParams
next(expression, index)
BrowserFeatures.XPath
* reset and serializeElements can only be
size()
called from Singleton
Updates a page element via Ajax
getElementsBySelector()
ScriptFragment
inspect()
Hash
initialize(el, url s, options o)
getElementsByClassName(s)
emptyFunction()
Form.Element = Field
map=collect
readAttribute(s)
K()
keys()
find=detect
Extends INPUT, TEXTAREA, and SELECT
Ajax.PeriodicalUpdater
getHeight()
values()
nodes via $() and $$() (if executed as
select=finaAll
Class
Singleton, element is first argument)
extends .Base
classNames()
merge(hash)
member=include
focus(el)
Enables object to use intialize method
hasClassName(s)
toQueryString()
Repeatedly updates element via Ajax
as constructor
entries=toArray
select(el)
addClassName(s)
inspect()
initialize(el, url s, options o)
create()
serialize()
removeClassName(s)
Array
start()
extends Enumerable
Selector
getValue()
Object
toggleClassName(s)
stop()
Extends default Array object
clear()
observe()
Selecting elements with CSS selectors
extend(dest o, src o)
from(a)
present()
stopObserving()
Insertion.Before
initialize(expression)
inspect(o)
clear()
activate()
cleanWhitespace()
findElements(scope el)
Insertion.Top
keys(o)
first()
disable()
empty()
toString()
Insertion.Bottom
values(o)
last()
enable()
childOf(ancestor el)
matchElements(els, expression)
Insertion.After
clone(o)
compact()
scrollTo()
* focus and select can only be
findElement(els,expression, index)
extend Abstract.Insertion
flatten()
called from Singleton
getStyle(s)
Function
findChildElements(el, expressions)
without(a)
Handles content insertion
setStyle(s)
Abstract.EventObserver
initialize(el, content s)
bind()
indexOf(o)
Position
getDimensions()
bindAsEventListener(o)
reverse(inline b)
initialize(el, f)
makePositioned()
PeriodicalExecuter
DOM node positioning
reduce()
Number
undoPositioned()
Form.Element.EventObserver
includeScrollOffsets
like setInterval but cooler
uniq()
makeClipping()
Form.EventObserver
prepare()
initialize(f, freq n)
toColorPart()
clone()
undoClipping()
extends Abstract.EventObserver
realOffset(el)
stop()
succ()
size()
cumulativeOffset(el)
getValue()
times(f)
inspect()
Abstract.TimedObserver
Event
positionedOffset(el)
toArray = clone
Template
initialize(el, freq n, f)
Replaces default browser Event handling
offsetParent(element)
Element.ClassNames
element(evt)
String template using #{var} markers
within(el, x, y)
Form.Element.Observer
extends Enumerable
Legend
initialize(template s, pattern)
isLeftClick(evt)
winthinIncludingScrollOffsets
Form.Observer
evaluate(o)
Handles element class names
pointerX(evt)
(el, x, y)
s=string
b=boolean
extends Abstract.TimedObserver
initialize(el)
pointerY(evt)
overlap(’vertical’|’horizontal’, el)
o=object
[ ]=optional
getValue()
ObjectRange
ext. Enumerable
set(classname s)
stop(evt)
page(el)
n=number
| = or
A numeric range
add(s)
findElement(evt, tagname s)
clone(src el, target el)
el=element
pattern=regex
remove(s)
observe(el, evtname, f, usecapture b)
initialize(start n, end n, exclusive b)
absolutize(el)
els=elements
include(n)
toString()
stopObserving(el, evtname, f, usecapture b)
relativize(el)
f=function (callback)

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go