Javascript


Javascript Client Side Object Hierarchy

Navigator's Object Arrays

Some Navigator objects have properties whose values are themselves arrays. These arrays are used to store information when you don't know ahead of time how many values there will be. The following table shows which properties of which objects have arrays as values.

Table 3.2 Predefined JavaScript arrays
Object Property Description
document
anchors
Reflects a document's <A> tags that contain a NAME attribute in source order
applets
Reflects a document's <APPLET> tags in source order
embeds
Reflects a document's <EMBED> tags in source order
forms
Reflects a document's <FORM> tags in source order
images
Reflects a document's <IMG> tags in source order (images created with the Image() constructor are not included in the images array)
links
Reflects a document's <AREA HREF="..."> tags, <A HREF=""> tags, and Link objects created with the link method in source order
Function
arguments
Reflects the arguments to a function
Form
elements
Reflects a form's elements (such as Checkbox, Radio, and Text objects) in source order
select
options
Reflects the options in a Select object (<OPTION> tags) in source order
window
frames
Reflects all the <FRAME> tags in a window containing a <FRAMESET> tag in source order
history
Reflects a window's history entries
navigator
mimeTypes
Reflects all the MIME types supported by the client (either internally, via helper applications, or by plug-ins)
plugins
Reflects all the plug-ins installed on the client in source order

 
 
 

Javascript Event Handlers

Event Applies to Occurs when Event handler
Abort
images User aborts the loading of an image (for example by clicking a link or clicking the Stop button)
onAbort
Blur
windows and all form elements User removes input focus from window or form element
onBlur
Change
text fields, textareas, select lists User changes value of element
onChange
Click
buttons, radio buttons, checkboxes, submit buttons, reset buttons, links User clicks form element or link
onClick
DragDrop
windows User drops an object onto the browser window, such as dropping a file on the browser window
onDragDrop
Error
images, windows The loading of a document or image causes an error
onError
Focus
windows and all form elements User gives input focus to window or form element
onFocus
KeyDown
documents, images, links, text areas User depresses a key
onKeyDown
KeyPress
documents, images, links, text areas User presses or holds down a key
onKeyPress
KeyUp
documents, images, links, text areas User releases a key
onKeyUp
Load
document body User loads the page in the Navigator
onLoad
MouseDown
documents, buttons, links User depresses a mouse button
onMouseDown
MouseMove
nothing by default User moves the cursor
onMouseMove
MouseOut
areas, links User moves cursor out of a client-side image map or link
onMouseOut
MouseOver
links User moves cursor over a link
onMouseOver
MouseUp
documents, buttons, links User releases a mouse button
onMouseUp
Move
windows User or script moves a window 
onMove
Reset
forms User resets a form (clicks a Reset button)
onReset
Resize
windows User or script resizes a window
onResize
Select
text fields, textareas User selects form element's input field
onSelect
Submit
forms User submits a form
onSubmit
Unload
document body User exits the page
onUnload

Operation of Javascript and when Javascript Client Side objects start to exists

Examples

Debug Javascript