Javascript Lesson 9

Foreword

In this lesson you will learn about the JavaScript Object Hierarchy. You will also find a table of the most commonly used JavaScript objects, with all of their properties, methods, and event handlers.

9.1 The Object Hierarchy

The image belows shows the Object Hierarchy:

The Object Hierarchy helps determine the right Dot Syntax for relationships between objects.
The following Dot Syntax was used in lesson 5:

document.formName.textBoxName.value

It is easy to follow the path to the text object of the form using the object hierarchy shown above.

9.2 Table Of Objects

Beneath is a table of the most commonly used JavaScript objects with all of their properties, methods and event handlers:

Hierarchy Objects

Object Properties Methods Event Handlers
Window defaultStatus
frames
opener
parent
scroll
self
status
top
window
alert
blur
close
confirm
focus
open
prompt
clearTimeout
setTimeout
onLoad
onUnload
onBlur
onFocus
Frame defaultStatus
frames
opener
parent
scroll
self
status
top
window
alert
blur
close
confirm
focus
open
prompt
clearTimeout
setTimeout
none
Location hash
host
hostname
href
pathname
por
protocol
search
reload()
replace()
none
History length
forward
go
back none
Navigator appCodeName
appName
appVersion
mimeTypes
plugins
userAgent
javaEnabled none
document alinkColor
anchors
applets
area
bgColor
cookie
fgColor
forms
images
lastModified
linkColor
links
location
referrer
title
vlinkColor
clear
close
open
write
writeln
none
image border
complete
height
hspace
lowsrc
name
src
vspace
width
none none
form action
elements
encoding
FileUpload
method
name
target
submit
reset
onSubmit
onReset
text defaultValue
name
type
value
focus
blur
select
onBlur
onCharge
onFocus
onSelect

Those are the most important objects, properties, methods and event handlers. Their names are obvious enough to understand their actions.
During the next lesson you will learn to know the image object better to make slideshows and mouseOver effects.

9.3 Assignment

  • It is essential that you understand the Object Hierarchy completely.
  • Take your time and study the Hierarchy Objects Table.
Home | Code | Learn
© 2007-2008 ProgLogic, all rights reserved. | ProgLogic.com is created by Stijn Strickx. | e-mail