JavaScript Guide - Contents

Introduction

What you should already know
How to use this book
Document conventions

Part 1 - Using JavaScript in Navigator

Chapter 1 Getting started

What is JavaScript?
JavaScript in Navigator
JavaScript in LiveWire
JavaScript, the language
JavaScript and Java
Embedding JavaScript in HTML
Script hiding
Example: a first script
Defining and calling functions
Using the write method
Printing output
Displaying output
Scripting event handlers
Using quotation marks
Example: using an event handler
Validating form input
Example validation functions
Using the validation functions

Chapter 2 Using Navigator objects

Navigator object hierarchy
document properties: an example
JavaScript reflection and HTML layout
Key Navigator objects
window and Frame objects
document object
form object
location and history objects

Chapter 3 Using windows and frames

Opening and closing windows
Opening a window
Closing a window
Using frames
Creating a frame
Updating a frame
Referring to and navigating among frames
Creating and updating frames: an example
Referring to windows and frames
Referring to a window's properties, methods, and event handlers
Referring to a window in a form submit or hypertext link
Navigating among windows and frames

Chapter 4 LiveConnect communication

Enabling LiveConnect
The Java Console
About the Netscape packages
Using the Netscape packages
JavaScript to Java communication
Accessing Java directly
Controlling applets
Controlling plug-ins
Java to JavaScript communication
Getting a handle for the JavaScript window
Accessing JavaScript objects and properties
Calling JavaScript methods

Chapter 5 More fun with scripts

Creating arrays
Defining an array
Populating an array
Using cookies
Limitations
Using cookies with JavaScript
Using cookies: an example
Using JavaScript URLs
Using client-side image maps
Using standard image maps
Using the status bar
Creating hints with onMouseOver
Using the Date object: an example
Determining installed plug-ins
mimeTypes array
plugins array

Part 2 - The JavaScript language

Chapter 6 Values, variables, and literals

Values
Data type conversion
Variables
Variable scope
Literals
Integers
Floating-point literals
Boolean literals
String literals

Chapter 7 Expressions and operators

Expressions
Conditional expressions
Operators
Assignment operators
Comparison operators
Arithmetic operators
Bitwise operators
Logical operators
String operators
Special operators
Operator precedence

Chapter 8 Object model

Objects and properties
Functions
Defining functions
Using functions
Using the arguments array
Creating new objects
Defining methods
Using this for object references

Chapter 9 Built-in objects and functions

String object
Math object
Date object
Built-in functions
The eval function
The parseInt and parseFloat functions

Chapter 10 Overview of JavaScript statements

Conditional statement
Loop statements
for statement
while statement
break statement
continue statement
Object manipulation statements and operators
for...in statement
new operator
this keyword
with statement
Comments

Part 3 - Reference

Chapter 11 Statements

break
comment
continue
for
for...in
function
if...else
new
return
this
var
while
with

Chapter 12 The Netscape packages

The Netscape classes
netscape.javascript.JSObject
netscape.javascript.JSException
netscape.plugin.Plugin
Summary of constructors and methods
Netscape package reference
call
destroy
eval
finalize
getMember
getPeer
getSlot
getWindow
init
isActive
JSException()
JSException(String)
JSException(String, String, int, String, int)
Plugin
removeMember
setMember
setSlot
toString

Chapter 13 Navigator JavaScript reference

abs
acos
action
alert
alinkColor
anchor method
Anchor object
anchors
appCodeName
Applet
applets
appName
appVersion
Area
arguments array
arguments property
Array
asin
atan
atan2
back
bgColor
big
blink
blur
bold
border
Button
ceil
charAt
Checkbox
checked
clearTimeout
click
close (document object)
close (window object)
complete
confirm
cookie
cos
Date
defaultChecked
defaultSelected
defaultStatus
defaultValue
description
document
E
elements array
elements property
embeds
enabledPlugin
encoding
escape
eval
exp
fgColor
filename
FileUpload
fixed
floor
focus
fontcolor
fontsize
Form
forms
forward
Frame
frames
Function
getDate
getDay
getHours
getMinutes
getMonth
getSeconds
getTime
getTimezoneOffset
getYear
go
hash
height
Hidden
history
host
hostname
href
hspace
Image
images
index
indexOf
isNaN
italics
javaEnabled
join
lastIndexOf
lastModified
length
link method
Link object
linkColor
links
LN2
LN10
location
log
LOG2E
LOG10E
lowsrc
Math
max
method
MimeType
mimeTypes
min
name
navigator
onAbort
onBlur
onChange
onClick
onError
onFocus
onLoad
onMouseOut
onMouseOver
onReset
onSelect
onSubmit
onUnload
open (document object)
open (window object)
opener
Option
options
parent
parse
parseFloat
parseInt
Password
pathname
PI
Plugin
plugins
port
pow
prompt
protocol
prototype
Radio
random
referrer
reload
replace
reset method
Reset object
reverse
round
scroll
search
select method
Select object
selected
selectedIndex
self
setDate
setHours
setMinutes
setMonth
setSeconds
setTime
setTimeout
setYear
sin
small
sort
split
sqrt
SQRT1_2
SQRT2
src
status
strike
String
sub
submit method
Submit object
substring
suffixes
sup
tan
target
Text object
text property
Textarea
title
toGMTString
toLocaleString
toLowerCase
top
toString
toUpperCase
type
unescape
URL
userAgent
UTC
value
vlinkColor
vspace
width
window object
window property
write
writeln

Appendix A Reserved words

Appendix B Color values

Appendix C Netscape cookies

Index


Copyright © 1996, Netscape Communications Corporation. All rights reserved.