Appendix I: The Scripts We Used

B C D E F G H I L M N O P S T U V W


Adding numbers

5.1, 5.8

Alert box, opens when user clicks on Submit button, onsubmit
12.9

Alert box, opens when user points at link, onmouseover
12.5

Alert box, opens when user selects text, onselect (may not work)
12.6

Alert message box, opening
3.1

Array length, exceeding
9.5

Arrays (object arrays), using to refer to things
10.5, 10.6

Arrays, creating and checking values
9.1, 9.2

Arrays, creating a shortcut
9.4

Arrays; selecting value in one array displays value from another
9.3

Background colors, controlling
14.14

bgColor, setting background colors
10.2, 14.14

Boolean Not
6.11

Boolean operators
6.10

Clearing windows
14.9, 14.12

Clock, placing in Web page
19.1

Closing windows
14.6

Cookies, using
13.4

Comment lines
3.4

Communicating with the user; changing defaultStatus
17.5, 17.6

Communicating with the user; defaultStatus
17.3, 17.4

Communicating with the user; setting status from a button
17.8

Communicating with the user; status
17.7

Communicating with the user; using forms
17.1

Communicating with the user; using prompt boxes
17.2

Communicating with the user; writing to a textarea
17.10

Communicating with the user; writing to the current document
17.9

Concatenation
5.8

Conditionals, = instead of ==
6.2

Conditionals, else clause
6.4

Conditionals, Greater Than (>)
6.7

Conditionals, Greater Than or Equal To (>=)
6.8

Conditionals, if statements without brackets
6.5

Conditionals, nesting if statements
6.9

Conditionals, Not Equal To (!=)
6.6

Conditionals, the ? operator
6.12

Conditionals, the if statement
6.1

Confirmation box, adding to link
14.18

Date object methods
11.2

Date object, creating instances
11.1

Date; document-modified, inserted into page
2.1, 3.1

Dividing numbers
5.4

Document stream, closing
14.11

Document stream, opening
14.10

else clause
6.4

escape
7.14

eval
7.11

focus()
14.8

Focus, changing to a window
14.8

for loops
6.13

for loops, mimicking with nested ifs
6.14

Form validation, onsubmit
12.8

Form validation, using onblur
12.1

Form validation, using onchange
12.2

Form validation, using onfocus
12.3

Form validation: see also the Area Code Program

Form validation; making sure it’s not too long
16.7

Form validation; checking that it’s a number
16.6

Form validation; making sure it’s not too long, nor too short
16.8

Form validation; verifying a number within range
16.5

Forms, passing data from one to another
16.4

Forms, passing data to functions
16.1

Forms, using information from a form in documents
17.1

Forms; no need to pass information
16.3

Forms; you can’t simply name the form within the function
16.2

Forwarding users to another page, with a Confirm dialog box
2.12

Forwarding users to another page
2.11

Frames, calling functions from another frame
15.8

Frames, changing contents with HTML
15.5

Frames, changing contents with JavaScript
15.6

Frames, creating with HTML
15.1, 15.2

Frames, referring to
15.3

Frames, using _top
15.4

Frames, using document.close
15.7

Functions, "call by value"
7.9

Functions, defining
3.2, 7.1

Functions, defining and calling
3.3

Functions, defining in the wrong place
7.2, 7.3

Functions, escape
7.14

Functions, eval
7.11

Functions, multiple returns
7.6

Functions, parseFloat
7.13

Functions, parseInt
7.12

Functions, passing multiple values to
7.8

Functions, passing values to
7.7, 7.8, 7.9

Functions, returning values
7.4, 7.5

Functions, unescape
7.15

Functions, working with multiple
7.10

Greater Than (>)
6.7

Greater Than or Equal To (>=)
6.8

Hiding scripts from non-JavaScript browsers
2.2

if statement
6.1

if statements with boolean variables
6.3

if statements, nesting
6.9

if statements, the ? shorthand
6.12

if statements, without brackets
6.5

Images, writing to a document
14.13

Links, adding confirmation boxes
14.18

Logical Operators, And
5.10

Logical Operators, Not
5.9

Logical Operators, Or
5.11

Loops, breaking out with break
6.17

Loops, for
6.13

Loops, for, mimicking with nested ifs
6.14

Loops, returning to the top with continue
6.18

Loops, while
6.15

Loops, while, without a counter
6.16

Math methods
11.3, 11.4

max
11.3

Message box opens when the user leaves the page
2.8

Message box opens when the user loads the page--after the page appears
2.7

Message box opens when the user loads the page--before the page appears
2.6

Message box pops up when user clicks on form element
2.10

Methods
10.3

Methods, creating
13.3

Modulus
5.5

Moving from page to page automatically--starting
14.15

Moving from page to page automatically--stopping
14.16

Multiplying numbers
5.3

Navigation buttons
2.5

navigator object and properties
10.1

Not Equal To (!=)
6.6

Object arrays, using to refer to things
10.5, 10.6

Object array, viewing properties with
13.5

Object hierarchy
10.8

Object methods, using
11.2

Object properties are sometimes strings
11.7

Objects, creating your own
13.1

Objects, creating methods for your
13.3

Objects, creating properties for your
13.2

Objects, creating instances
11.1

Objects, referring to
10.4

Objects, string
11.5, 11.6. 11.7

onblur
12.1

onchange
12.2

onfocus
12.3

onload
12.4

onmouseover
2.9, 12.5

onselect
12.6

onsubmit
12.7, 12.8

onunload
12.9

parseFloat
7.13

parseInt
7.12

PI
11.4

Picking a destination or choice
14.17

Precedence, operator
5.12

Prompt boxes, using to grab information from user
17.2

Properties, viewing with the object array
13.5

Secondary window, opening
2.4, 14-1 to 14-5

Slide shows, creating
14.15

Slide shows, stopping
14.16

Spaces, you don’t always need them
8.1

SQRT
11.4

Status-bar message when user points at link
2.9

Status-bar messages, default; changing defaultStatus
17.5, 17.6

Status-bar messages, scrolling
19.2

Status-bar messages, temporary; defaultStatus
17.3, 17.4

Status-bar messages, temporary; setting status from a button
17.8

Status-bar messages, temporary; status
17.7

String literals, using special characters
4.7

String objects
11.5, 11.6, 11.7

Subtracting numbers
5.2

Textareas, writing to
17.10

Type conversion
5.13

Type conversion, subtracting strings and numerics
5.14

Type conversion, subtracting with text
5.15

Type conversion, multiplying with text
5.16

unescape
7.15

URL; finding the URL of the document the user came from
2.3

User, asking where to go or what to display
14.17

Validation form; making sure it’s not too long
16.7

Validation form; checking that it’s a number
16.6

Validation form; making sure it’s not too long, nor too short
16.8

Validation form; verifying a number within range
16.5

Validation, form: see also the Area Code Program

Variables, a problem caused by not using var
4.5

Variables, adding numbers
5.1

Variables, concatenation
5.8

Variables, declaring
4.1

Variables, decrementing
5.7

Variables, demonstrating scope
4.4

Variables, dividing numbers
5.4

Variables, incrementing
5.6

Variables, modulus
5.5

Variables, multiplying numbers
5.3

Variables, subtracting numbers
5.2

Variables, the problem fixed
4.6

Variables, undefined
4.3

Variables--same name, different case
4.2

What next?
14.17

Where do you want to go?; asking the user with onload
12.4

Where next?
14.17

while loops
6.15

while loops, without a counter
6.16

window.location Vs. document.location
10.7

window.location Vs. document.location
10.7

Windows, changing focus to
14.8

Windows, clearing
14.9, 14.12

Windows, closing
14.6

Windows, controlling background colors
14.14

Windows, opening a complete window
14.2

Windows, opening a window with just the location bar
14.3

Windows, opening a window with various components
14.4

Windows, opening from a link--the problems
14.5

Windows, referring to
14.1

Windows, writing to
14.7

Windows, writing images to a document
14.13

Windows, writing to the document stream
14.10, 14.11

Writing to a window
14.7