search for books and compare prices
Tables of Contents for Javascript Comprehensive
Read This Before You Begin
xviii
Introduction to Javascript
1
44
Section A: Programming, HTML, and Javascript
2
19
The World Wide Web2
1
JavaScript's Role on the Web3
3
Hypertext Markup Language6
4
Creating an HTML Document10
2
The JavaScript Programming Language12
2
Logic and Debugging14
1
Summary15
1
Questions16
2
Exercises18
3
Section B: A First JavaScript Program
21
24
The <SCRIPT> Tag21
6
Creating a JavaScript Source File27
4
Adding Comments to a JavaScript Program31
2
Hiding JavaScript from Incompatible Browsers33
3
Placing JavaScript in HEAD or BODY sections36
1
Summary37
1
Questions38
3
Exercises41
4
Variables, Functions, Objects, and Events
45
62
Previewing the NorthAmericaImageMap.html File46
2
Section A: Working with Variables, Functions, and Objects
48
33
Variables48
3
Defining Custom Functions51
1
Calling Functions52
6
Built-In JavaScript Functions58
1
Understanding JavaScript Objects59
1
Custom JavaScript Objects59
2
Built-In JavaScript Objects61
1
Custom Object Inheritance and Prototypes62
5
Custom Object Methods67
2
Variable Scope69
2
Summary71
2
Questions73
3
Exercises76
5
Section B: Using Events
81
26
Understanding Events81
1
HTML Tags and Events82
2
Event Handlers84
4
Links88
2
Link Events90
5
Creating an Image Map95
7
Summary102
1
Questions103
2
Exercises105
2
Data Types and Operators
107
64
Previewing the Calculator Program108
1
Section A: Using Data Types
109
27
Data Types109
4
Numeric Data Types113
2
Boolean Values115
1
Strings116
8
Arrays124
6
Summary130
1
Questions131
2
Exercises133
3
Section B: Expressions and Operators
136
35
Expressions136
1
Arithmetic Operators137
5
Assignment Operators142
4
Comparison Operators146
5
Logical Operators151
3
Working with Strings154
1
The String Object155
5
Operator Precedence160
1
Creating the Calculator Program161
3
Summary164
1
Questions165
3
Exercises168
3
Decision Making with Control Structures and Statements
171
58
Previewing the CartoonQuiz.html File172
1
Section A: Decision Making
173
25
if Statements173
8
if...else Statements181
2
Nested if and if...else Statements183
5
switch Statements188
5
Summary193
1
Questions194
1
Exercises195
3
Section B: Repetition
198
31
while Statements198
6
do...while Statements204
3
for Statements207
7
for...in Statements214
3
with Statements217
2
continue Statements219
2
Summary221
1
Questions222
3
Exercises225
4
Previewing the VirtualZoo Program230
1
Section A: Working with Windows
231
21
The JavaScript Object Model231
3
The Window Object234
2
Opening and Closing Windows236
8
Working with Timeouts and Intervals244
3
Summary247
1
Questions248
2
Exercises250
2
Section B: Working with Frames and Other Objects
252
37
Creating Frames252
5
Using the TARGET Attribute257
4
Nesting Frames261
4
Frame Formatting265
3
The NOFRAMES Tag268
1
The Location Object269
1
The History Object270
4
The Navigator Object274
4
Referring to Frames and Windows278
3
Summary281
1
Questions282
2
Exercises284
5
Previewing the Product Registration Form290
3
Section A: Working with Forms in JavaScript
293
41
Overview of Forms293
1
The Common Gateway Interface294
2
The <FORM> Tag296
7
Form Elements: An Overview303
1
Input Fields304
1
Text Boxes305
2
Password Boxes307
1
Radio Buttons308
2
Check Boxes310
3
Reset Buttons313
3
Command Buttons316
3
Submit Buttons319
2
Image Submit Buttons321
2
Selection Lists323
2
Multiline Text Fields325
2
Summary327
1
Questions328
3
Exercises331
3
Section B: Validating a User's Input to a Form
334
29
Hidden Form Fields334
5
The Form Object339
1
Referencing Forms and Form Elements339
4
Form Event Handlers343
5
Form Methods348
3
Form Properties351
2
E-Mailing Form Data353
3
Summary356
1
Questions357
2
Exercises359
4
Debugging Javascript
363
60
Section A: Basic Debugging Techniques
364
27
Understanding Debugging364
2
Error Messages366
3
Tracing Errors with the alert() Method369
4
Tracing Errors with the write() and writeln() Methods373
3
Using Comments to Locate Bugs376
3
Additional Debugging Techniques379
1
Checking HTML Tags380
1
Analyzing Your Logic381
1
Testing Statements with JavaScript URLs382
1
Reloading an HTML Document383
1
Summary383
1
Questions384
2
Exercises386
5
Section B: Advanced Debugging Techniques and Resources
391
32
Using a for...in Statement to Check Object Properties391
1
Watch Points in Netscape392
3
Netscape JavaScript Debugger395
3
Source View398
2
Step Commands400
1
Breakpoints401
3
Tracing Variables and Expressions404
2
The Call Stack Window406
2
Microsoft Script Debugger408
1
The Script Debugger Window408
2
Step Commands410
1
Breakpoints411
2
Tracing Variables and Expressions413
1
The Call Stack Window414
1
JavaScript Language Bugs and Debugging Resources415
1
Summary416
1
Questions417
2
Exercises419
4
Dynamic HTML and Animation
423
78
Previewing the Animation Files424
3
Section A: Dynamic HTML
427
36
Introduction427
4
Document Object Model431
3
Document Object Properties434
2
Document Object Methods436
3
The Image Object439
4
Animation with the Image Object443
8
Image Caching451
6
Summary457
1
Questions457
3
Exercises460
3
Section B: Animation and Cascading Style Sheets
463
38
Cascading Style Sheets463
6
Using JavaScript with CSS Styles469
1
Using JavaScript and Styles in Older Versions of Navigator469
3
Using JavaScript and Styles in Older Versions of Internet Explorer472
1
Using JavaScript and Styles with the W3C DOM473
2
CSS Positioning475
4
Dynamic Positioning in Older Versions of Internet Explorer479
6
Dynamic Positioning in Navigator485
4
Dynamic Positioning with W3C DOM-Compliant Browsers489
3
Cross-Browser Compatibility492
3
Summary495
2
Questions497
3
Exercises500
1
Cookies and Security
501
58
Previewing the Product Registration and Home Page Programs502
2
Section A: State Information and Cookies
504
30
State Information504
1
Saving State Information with Query Strings505
4
Parsing a String509
2
Saving State Information with Cookies511
1
Creating Cookies512
10
Reading Cookies522
4
Summary526
1
Questions527
3
Exercises530
4
JavaScript Security Concerns534
2
The Same Origin Policy536
3
Signed Scripts and Digital Certificates539
3
Creating a Test Certificate542
3
Working with Privileges545
5
Signing a JavaScript Program550
4
Enabling Codebase Principals554
1
Summary554
2
Questions556
2
Exercises558
1
Server - Side Javascript
559
72
Previewing the WebAdventure Home Page560
3
Section A: Netscape SSJS
563
34
Client/Server Architecture563
3
Server-Side JavaScript Development566
1
Creating SSJS Applications567
1
Server-Side Scripts568
3
Compiling and Deploying an Application571
2
Installing and Starting an Application573
4
SSJS Core Objects577
1
Request Object578
4
Client Object582
2
Project Object584
3
Server Object587
1
Creating a Guest Book587
6
Summary593
1
Questions594
1
Exercises595
2
Section B: Microsoft Active Server Pages
597
34
Introduction to Active Server Pages597
1
Creating ASP Applications598
1
Server-Side Scripts598
3
ASP Directives601
2
Mixing HTML and Server-Side JavaScript603
4
Object Collections607
2
ASP Core Objects609
1
Request Object609
4
Response Object613
1
Session Object613
2
Application Object615
3
Server Object618
1
Creating a Guest Book619
5
Summary624
2
Questions626
2
Exercises628
3
Database Connectivity
631
86
Previewing the Registration Program632
1
Section A: Overview of Databases and Connecting to Databases with SSJS
633
47
Understanding Databases633
5
Database Management Systems638
6
Structured Query Language644
4
The LiveWire Database Service648
4
Executing SQL Commands652
1
The execute() Method652
7
The Cursor Object659
7
The SQLTable() Method666
2
Transaction Processing with LiveWire668
2
Error Handling with LiveWire670
2
Summary672
2
Questions674
3
Exercises677
3
Section B: Connecting to Databases with Active Server Pages
680
37
Introduction680
5
ADO Object Model685
4
The ADO Connection Object689
4
Executing SQL Commands693
1
The Execute() Method693
6
The Recordset Object699
10
Transaction Processing with ADO709
1
Error Handling with the ADO Error Object710
1
Summary711
1
Questions712
2
Exercises714
3
Working With Lava Applets Aid Embedded Data
717
1
Previewing the Guessing Game and Embedded Data Programs718
3
Section A: A Java Tutorial
721
28
Applets and Embedded Data721
1
Introduction to Java722
2
Classes724
1
Methods725
2
Compiling a Java Program727
2
Creating an Applet729
2
Java Variables and Data Types731
4
Adding an Applet to an HTML document735
3
Controlling Java Applets with JavaScript738
5
Summary743
1
Questions744
3
Exercises747
2
Section B: LiveConnect, Plug-Ins, and ActiveX
749
1
Overview749
1
Java Packages and LiveConnect750
2
Data Conversion between Java and JavaScript752
1
Controlling JavaScript with Java753
1
Importing the JSObject and JSException Classes754
1
Using the JSObject Class Methods755
4
The MAYSCRIPT Attribute759
1
Directly Accessing Java Classes from JavaScript760
2
Embedded Data762
1
Plug-ins763
7
ActiveX Controls770
2
Summary772
2
Questions774
3
Exercises777
appendix A JAVASCRIPT REFERENCE
1
1
Line Comments1
1
Block Comments1
1
Javascript Reserved Words
2
1
Legal Identifiers2
1
Illegal Identifiers2
1
Built-In JavaScript Functions
3
1
Built-In JavaScript Objects3
1
JavaScript Events4
1
HTML Elements and Associated JavaScript Events4
2
JavaScript Escape Sequences
6
1
Data Type Conversion Functions and Methods
6
1
JavaScript Operator Types7
1
Arithmetic Binary Operators7
1
Arithmetic Unary Operators8
1
Assignment Operators8
1
Comparison Operators8
1
Logical Operators9
1
Operator Precedence9
1
Control Structures and Statements
10
1
Array Object11
1
Date Object12
1
Document Object13
2
Form Object15
1
History Object15
1
Image Object16
1
Location Object17
1
Math Object17
1
Navigator Object18
1
Number Object19
1
String Object19
2
Window Object21
<