search for books and compare prices
Tables of Contents for Javascript Sourcebook
Chapter/Section Title
Page #
Page Count
Part 1 Introducing JavaScript
1
72
Chapter 1 What JavaScript Is All About
3
20
The Birth of JavaScript
4
1
Why JavaScript Is So Important (and Why Should I Care?)
5
1
Uses for JavaScript
5
3
Using JavaScript in an HTML Document
8
2
Trying the Script Yourself
10
1
The Role of the [SCRIPT] Tag
10
3
A Realistic Use of JavaScript
13
1
Viewing JavaScript "Objectively"
14
3
A Method to Its Madness
17
1
Statements Tie It All Together
17
1
JavaScript FAQ
17
6
Chapter 2 Stuff You Should Know: Basic Programming
23
18
Thinking Like a Nerd...,er...,Programmer
24
1
The Object Is the Game
24
1
Going with the Flow
25
2
The Benefit of Routines
27
1
Variables
28
2
Expressions
30
1
Strings
31
1
Numeric Values
32
1
Conditional Statements
33
1
Looping
34
1
Entering Data
34
1
Outputting Data
35
1
Other JavaScript Topics of Interest
36
2
JavaScript FAQ
38
3
Chapter 3 Overview of JavaScript Programming
41
32
An Overview of JavaScript Objects
42
3
An Overview of JavaScript Properties
45
5
An Overview of JavaScript Methods and Functions
50
6
An Overview of JavaScript Statements
56
1
An Overview of JavaScript Event Handlers
57
1
Authoring Programs In JavaScript
58
3
Programming Considerations
61
7
JavaScript FAQ
68
5
Part 2 Core JavaScript
73
194
Chapter 4 Objects
75
34
Anchor Object
76
1
Anchors[] Array
76
1
Button Object
77
1
Checkbox Object
78
1
Date Object
79
2
Document Object
81
2
Elements[] Array
83
1
Frame Object
83
2
Frames[] Array
85
1
Form Object
86
1
Forms[] Array
87
1
Hidden Object
88
1
History Object
89
1
Link Object
90
1
links[] array
91
1
Location Object
92
1
Math Object
93
2
Navigator Object
95
1
Options[] Array
95
2
Password Object
97
1
Radio Object
98
1
Reset Object
99
1
Select Object
100
1
String Object
101
1
Submit Object
102
1
Text Object
103
1
Textarea Object
104
2
Window Object
106
3
Chapter 5 Properties
109
18
Browser Properties
110
1
Document Information and Appearance Properties
111
2
Form and Form Control Properties
113
5
Link Properties
118
2
Math Properties
120
1
String Properties
121
1
Window URL Properties
122
2
Window and Frame Properties
124
3
Chapter 6 Methods and Functions
127
56
Date Methods
128
5
Document Methods
133
5
Form Methods
138
6
History Methods
144
3
JavaScript Functions
147
7
Math Methods
154
3
String Methods
157
15
User Interface Methods
172
5
Window Methods
177
6
Chapter 7 Expressions
183
22
Creating Expressions
184
1
Assignment Operators
184
3
Math Operators
187
1
Relational Operators
188
5
The ! (NOT) Operator
193
1
Using the ? Conditional Expression Statement
194
1
The Bitwise Operators
195
5
Operators and Strings
200
1
Multiple Operators
201
4
Chapter 8 Statements
205
20
// (Comment)
206
1
break
207
1
continue
208
1
for
209
1
for...in
210
2
function
212
1
if...else
213
2
new
215
1
return
216
2
this
218
1
var
219
2
while
221
2
with
223
2
Chapter 9 Variables
225
28
Understanding Variables
225
5
Variable Naming Conventions
230
1
Understanding JavaScript's "Loose" Variable Data Types
231
1
Using the var Statement to Assign a Variable
231
1
The Rules and Regulations of Assigning Variables
232
1
String Length Limitations and Combining String Variables
233
1
Number or String in a Variable: When Does It Make a Difference?
233
2
Understanding the Scope of Variables
235
2
Referencing Variables in Other Loaded Documents
237
3
Understanding When Variables Are Lost
240
2
Using Variable Shortcuts, Tips, and Tricks
242
2
Understanding Arrays
244
9
Chapter 10 Events
253
14
How Event Handlers Are Used
254
1
onBlur Event Handler
255
1
onChange Event Handler
256
1
onClick Event Handler
257
1
onFocus Event Handler
258
1
onLoad Event Handler
259
2
onMouseOver Event Handler
261
1
onSelect Event Handler
262
1
onSubmit Event Handler
263
1
onUnload Event Handler
264
3
Part 3 JavaScript in the Real World
267
234
Chapter 11 Defining Functions, Objects, and Methods
269
28
Introducing Functions
270
3
Passing a Value to a Function
273
2
Returning a Value from a Function
275
1
Returning from a Function Prematurally
276
1
Defining Local Variables
277
2
Calling One Function from Another Function
279
1
Creating Objects with User-Defined Functions
280
4
Creating User-Defined Methods
284
3
Extending Built-in Objects
287
2
Understanding and Using Array Objects
289
8
Chapter 12 How Do I?
297
62
Short Takes
300
1
Working with Windows and Frames
301
9
Working with Functions
310
2
Working with Forms
312
9
Working with Links and Anchors
321
8
Working with Window Histories
329
2
Working with Dates
331
7
Working with Netscape (Or Another Browser)
338
21
Chapter 13 "Plug-and-Play" Routines
359
50
Using the Routines
359
5
The Plug-and-Play Library Files
364
1
The library.txt Functions
364
30
The datefunc.txt Functions
394
11
Number-to-Word Functions (num2word.txt)
405
4
Chapter 14 Fixing Broken JavaScript Programs
409
22
Isolating the Problem
410
2
Common Problems
412
2
Determining the Source of a Problem
414
1
The 11 Most Common Mistakes
415
5
Common (and Some Not So Common) JavaScript Error Messages
420
11
Chapter 15 Using JavaScript in Frames
431
30
Overview of the Frameset Document Structure
432
1
Understanding the Frameset Window Hierarchy
433
2
Other Supported Frame Reference Styles
435
1
Practicing with Frames and JavaScript
436
4
Another Example of Frames and JavaScript
440
6
Running Script in Another Frame
446
2
"Lost" Variables on Reloads
448
2
Changing the URL of a Frame
450
2
Moving Through the History List of a Frame
452
1
Dynamically Creating a Frameset Document
453
2
Loading the "Referring Page" into a Frame
455
1
Creating Double-Purpose Frame/No-Frame Pages
456
1
Adding onLoad and onUnload Events to Frames
457
3
Using the "hldaho Frameset"
460
1
Chapter 16 Using JavaScript and Forms
461
40
Creating the Form
462
1
Getting a Value from a Form Object
463
2
Setting a Value in a Form Object
465
1
Reading Other Form Object Values
466
1
Using Hidden Text Boxes
467
1
Using Radio Buttons
467
2
Using Checkboxes
469
1
Using Text Areas
470
2
Using Selection Lists
472
4
Other Events You Can Trigger within a Form
476
1
Submitting the Form to the Server
477
3
Validating Form Data Using JavaScript
480
1
Input Validation Routines
481
2
Overview of Validation Routines
483
1
Practical Examples of Input Validation
484
4
Validating Non-Text Controls
488
3
Using Forms to Provide Password Protection of Files
491
6
Creating a "Secret Message" Game Page
497
4
Part 4 Extending JavaScript
501
204
Chapter 17 Using JavaScript with Advanced HTML
503
44
Creating a Digital Clock with JavaScript
504
4
Using Arrays for Form Input
508
3
Augmenting Counters with JavaScript
511
4
Using JavaScript with Client-Side Image Maps
515
4
Creating a Slideshow Control Bar
519
5
Using "Client Pull" with JavaScript
524
2
Using setTimeout for a Self-Running Presenter
526
8
Using the TYPE="image" Form Control
534
3
Using JavaScript to Build a Small Database
537
7
More JavaScript Projects
544
3
Chapter 18 Using CGI with JavaScript
547
24
A Non-Technical Introduction to CGI
548
2
Programming CGI
550
1
An Example of CGI
551
4
Adding JavaScript to the Mix
555
4
Verifying Input and Submitting the Form
559
2
Resetting the Form
561
1
Using CGI to Build a "Hit" Counter with JavaScript
561
10
Chapter 19 Working with Java and Netscape Plugs-Ins
571
20
What Is a Java Applet?
572
4
A Scrolling Marquee Using Java
576
2
Playing Java in a Frame
578
4
Getting Java to Trigger a JavaScript Function
582
1
What Is a Plug-In?
582
3
Using JavaScript to Play a Different Sound for Every Day of the Week
585
2
Running a Plug-In in a Frame
587
4
Chapter 20 Using JavaScript for Sound, Animation, and Graphics
591
46
Playing a Sound
592
3
Playing a Sound with a Plug-In
595
4
Using "Client Pull" for Repeating Sounds
599
4
JavaScript for Animation
603
7
Creating a "Fade In" and "Fade Out" Look
610
6
Using XBM Graphics with JavaScript
616
8
Using JavaScript for "On-the-Fly" Image Sizing
624
5
Shortcuts with Graphics and Text
629
8
Chapter 21 All About HTML
637
54
Typical HTML Document
638
1
HTML Anchor Element
638
2
HTML Block Elements
640
18
HTML Inline Elements
658
2
HTML Image Element
660
6
HTML List Elements
666
9
HTML Form Elements
675
3
HTML Table Element
678
4
HTML Frameset Elements
682
5
Deciphering RGB Triplet Values
687
4
Chapter 22 JavaScript Additions in Netscape 3.0
691
14
Built-in Object Constructors
692
2
Image Object
694
1
New Event Handlers
695
2
JavaScript Libraries
697
1
The typeof Operator
697
1
Form Element type Property
698
1
Connecting with Java
699
1
Testing for Plug-Ins
700
2
Extending Objects
702
1
Window opener Property
703
1
Modifiable select Objects
703
1
Miscalleneous Netscape 3.0 Changes to JavaScript
704
1
Appendix A
705
3
Appendix B
708
5
Index
713