Skip to content

How to Do Everything with JavaScript

Best in textbook rentals since 2012!

ISBN-10: 0072252863

ISBN-13: 9780072252866

Edition: N/A

Authors: Scott Duffy

List price: $24.99
Blue ribbon 30 day, 100% satisfaction guarantee!
Out of stock
We're sorry. This item is currently unavailable.
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

Bring interactivity to any Web site with this easy-to-follow guidebook on JavaScript. Author Scott Duffy takes the fear out of working with a programming language by delivering instruction and theory in manageable doses, along with practical examples and plenty of ready-to-use code. Learn to write a program by exploring statements, variables, and functions -- the three basic building blocks of any program. Use JavaScript as the behind-the-scenes director of your Web browser presentation. Create basic and advanced JavaScript applications -- plus, modify existing scripts to suit your needs -- all with the help of this great resource. Book jacket.
Customers also bought

Book details

List price: $24.99
Publisher: McGraw-Hill Professional Publishing
Publication date: 1/1/2003
Binding: E-Book 
Language: English

Acknowledgmentsp. xv
Introductionp. xvii
Learn JavaScript Basics
Prepare to Program in JavaScriptp. 3
Learn the History of JavaScriptp. 4
The Origin of JavaScriptp. 5
JavaScript Makes Its Way into Internet Explorerp. 5
JavaScript Becomes an Official Standardp. 5
Where JavaScript Is Todayp. 6
Choose a Development Environmentp. 7
Develop JavaScript-Enabled Web Pagesp. 7
Create Server-Based Web Applicationsp. 8
Use JavaScript in a DOS or Windows Environmentp. 9
JavaScript Development Toolsp. 9
Learn What JavaScript Can and Cannot Dop. 13
Use JavaScript as a Client-Side Languagep. 14
Use JavaScript as a Server-Side Languagep. 14
Decide Which Version of JavaScript to Usep. 15
Test JavaScript Programs Using HTMLp. 16
Create a JavaScript Templatep. 16
Understand the JavaScript Templatep. 18
Communicate with the Userp. 19
Display an Alert Messagep. 20
Write Text to the Browser Windowp. 21
Learn More about Topics Discussed in this Chapterp. 22
Learn JavaScript Fundamentalsp. 25
Understand Basic Terminologyp. 26
Store Data in Variablesp. 26
Define Variablesp. 27
Define Constantsp. 28
Understand Program Flowp. 29
Control Program Flow with Statementsp. 30
Execute Code Conditionallyp. 30
Repeat Statements Using Loopsp. 34
Comment Your Codep. 43
Set a Default Objectp. 44
Handle Errorsp. 46
Understand the Basics of Expressionsp. 49
Use Operators to Create Complex Expressionsp. 50
Organize Your Code into Functionsp. 51
Define Functionsp. 52
Accept Parametersp. 54
Understand Variable Scopep. 56
Return Valuesp. 58
Use the Improvements in JavaScript 2.0 to Create More Powerful Functionsp. 59
Use Named Optional Parametersp. 60
Accept Any Number of Parametersp. 61
Use Built-in JavaScript Classesp. 63
Learn about Objects in JavaScriptp. 64
Write Unstructured Programsp. 65
Organize Code into Proceduresp. 65
Separate a Program into Modulesp. 66
Use the Object-Oriented Approachp. 66
Turn Properties and Functions into a Classp. 68
JavaScript's Built-in Classes and Data Typesp. 69
Instantiate an Object with the new Operatorp. 72
Access an Object with the Operatorp. 73
Access an Object with the [] Operatorp. 73
Create a String Object in JavaScriptp. 73
Create a String Object Using a String Literalp. 74
Create a String Object Using the String Data Typep. 76
Use the String Object's Built-in Functionalityp. 76
Perform Mathematical Functionsp. 78
Apply JavaScript's Date-Handling Functionsp. 79
Convert Strings into Numbersp. 82
Use the parseInt and parseFloat Functionsp. 82
Prepare Text Before Sending to Web Serverp. 84
Use the escape and unescape Functionsp. 85
Decide When to Use Regular Expressionsp. 86
Understand the Basics of Regular Expressionsp. 87
Create Patterns with a RegExp Objectp. 89
Understand JavaScript 2.0's Powerful New Data Typesp. 91
Use the Boolean, Integer, and Number Data Typesp. 91
Use the char Data Typep. 91
Use the Object Data Typep. 92
Understand Special Data Typesp. 92
Organize Data into Arraysp. 95
Create an Array Objectp. 97
Create an Empty Arrayp. 97
Specify an Initial Array Lengthp. 99
Create and Initialize an Array in One Line of Codep. 100
Use Array Literalsp. 100
Call the Properties and Methods of the Array Objectp. 101
Set and Retrieve Values in an Arrayp. 104
Use Multidimensional Arraysp. 107
Use JavaScript 2.0's Enhanced Arraysp. 111
The StaticArray Classp. 112
The DynamicArray Classp. 114
The ConstArray Classp. 114
Create Your Own JavaScript Classesp. 117
Learn about Classes in JavaScriptp. 118
Create Objects in JavaScript 1.xp. 118
Call a Constructor Functionp. 119
Use an Object Literalp. 122
Extend an Existing Classp. 123
Extend an Existing Objectp. 125
Create Objects in JavaScript 2.0p. 126
Define Your Own Classesp. 127
Organize Classes Using Inheritancep. 130
Choose Between Static and Instance Membersp. 135
Make Class Members Public or Privatep. 136
Build JavaScript-Enabled Web Sites
Embed JavaScript in a Web Pagep. 141
Understand Basic HTML Structurep. 142
Build an HTML Documentp. 145
Indicate the Document Type with [left angle bracket]!DOCTYPE[right angle bracket]p. 146
Add a Title and Define Document Keywordsp. 147
Format Text with HTML Elementsp. 148
Format Text with Style Sheetsp. 150
Use [left angle bracket]script[right angle bracket] to Add JavaScript to a Web Pagep. 153
Use [left angle bracket]noscript[right angle bracket] for Browsers That Don't Support Scriptingp. 154
Load an External JavaScript Filep. 157
Call JavaScript Using Hyperlinksp. 158
Learn More about the Topics in this Chapterp. 159
Create Scripts That Work in Every Browserp. 161
Understand Browser Differencesp. 162
What Kind of Errors Can Occur?p. 163
Detect What Type of Browser the User Is Runningp. 164
Query the Document Modelp. 169
Stick to Web Standardsp. 170
Write Cross-Browser Codep. 171
Manipulate Web Formsp. 179
Understand HTML Formsp. 180
Request User Input Using an HTML Formp. 181
Process Form Input with Client-Side JavaScriptp. 182
Process Form Input on a Web Serverp. 183
Insert an HTML Form into a Web Pagep. 184
Retrieve and Set Form Control Values in JavaScriptp. 200
Access Form Values Using the forms Arrayp. 200
Access Form Values Using the elements Arrayp. 202
Access Form Values Using getElementById()p. 204
Access Form Values Using getElementsByName()p. 204
Access Form Values Using getElementsByTagName()p. 205
Handle Browser Eventsp. 207
Write JavaScript Event Handlersp. 208
Handle User Interface Eventsp. 209
Handle Mouse Eventsp. 211
Handle Key Eventsp. 212
Handle HTML Eventsp. 215
Handle Events Using the Event Propertyp. 218
Trigger Events in JavaScriptp. 219
Call the Method Associated with an Eventp. 219
Use the fireEvent Methodp. 220
Overcome Browser Incompatibilityp. 220
Communicate Between Browser Framesp. 223
Learn the Basics of HTML Framesp. 224
Create a Frameset in HTMLp. 225
Define and Name Frames in a Framesetp. 233
Call JavaScript Functions from Other Framesp. 235
Access Another Frame Using JavaScriptp. 236
Call a JavaScript Function Located in Another Framep. 237
Handle Synchronization Between Framesp. 239
Interact with the Web Browserp. 243
Learn the Basics of the Document Object Modelp. 245
Manipulate the Contents of a Web Pagep. 248
Dynamically Modify the Contents of a Web Pagep. 249
Change the Items in a Drop-Down List Boxp. 251
Examine the Entire Browser Windowp. 252
Retrieve Properties of the Web Browser Softwarep. 254
Examine the Operating System's Display Settingsp. 256
Access the Web Browser History Listp. 257
Send the Browser to a New Locationp. 258
Perform Simple Animationp. 259
Learn the Basics of Cascading Style Sheetsp. 260
Assign Style to Web Pages Using HTML Elementsp. 261
Assign Style to Web Pages Using Style Sheetsp. 264
Use Basic Style Attributesp. 268
Position Elements on a Web Pagep. 268
Modify Styles Using JavaScriptp. 270
Understand Cross-Platform Issuesp. 272
Perform Basic Animation Using JavaScriptp. 274
Dynamically Load Imagesp. 274
Make Content Move Around the Screenp. 276
Take JavaScript to the Next Level
Debug JavaScript Programsp. 281
Understand the Possible Causes of Errorsp. 282
Find the Source of an Error Messagep. 284
Interpret Error Messagesp. 285
Use a JavaScript Validatorp. 287
Add Debugging Code to Your Programsp. 287
Use the JavaScript Consolep. 290
Use a JavaScript Debuggerp. 291
Make Your Program Errorproofp. 295
Learn the Basics of Exceptionsp. 296
Catch Exceptions Using the try and catch Statementsp. 297
Understand Exception Bubblingp. 299
Use the IE Error Objectp. 301
Use Netscape-Only catch Clausesp. 302
Use Nonstandard finally Clausesp. 302
Create Exceptions Using the throw Statementp. 304
Design Programs That Are Easy to Debug from the Startp. 306
Avoid Unstructured Programmingp. 307
Break Code into Manageable Chunksp. 307
Reuse Code Using Classes and Objectsp. 308
Test Your JavaScript Code Thoroughlyp. 309
Create a Testing Harnessp. 309
Force Errors to Test Error-Handling Codep. 311
Try Your Program in Many Different Environmentsp. 312
Use JavaScript to Manage Browser Plug-Insp. 313
Insert Scriptable Objects into HTML Web Pagesp. 315
Include Sun Java Appletsp. 315
Connect to Java Applets Using JavaScriptp. 319
Embed Movies and Music in Web Pagesp. 321
Connect to Music and Media Objects Using JavaScriptp. 322
Use the Microsoft Calendar Control in Your Web Pagesp. 324
HTML 4.01 Tagsp. 327
JavaScript Quick Referencep. 331
Indexp. 335
Table of Contents provided by Rittenhouse. All Rights Reserved.