Cover image for Beginning JavaScript
Title:
Beginning JavaScript
Personal Author:
Series:
Programmer to programmer
Edition:
2nd ed.
Publication Information:
Indianapolis, IN : Wiley Pub., 2004
ISBN:
9780764555879

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000004708230 QA76.73.J39 W54 2004 Open Access Book Book
Searching...

On Order

Summary

Summary

What is this book about?

JavaScript is the preferred programming language for Web page applications, letting you enhance your sites with interactive, dynamic, and personalized pages. This fully updated guide shows you how to take advantage of JavaScript's client-side scripting techniques for the newest versions of Netscape and Internet Explorer, even if you've never programmed before.

You begin with basic syntax and learn about data types and how to structure code for decision-making. Then you learn to use dates, strings, and other basic objects of JavaScript. Next, you see how to use JavaScript to manipulate objects provided by the browser, such as forms and windows. From there, you move into advanced topics like using cookies and dynamic HTML.

After you have a solid foundation, you explore dynamic generation of Web content using server-side scripting and back-end databases. And you practice what you learn by building a sample application as you go.

What does this book cover?

Here are some of the things you'll find in this book:

What types of data are used in JavaScript How to identify and correct flaws in your code Techniques for programming the browser How to use Microsoft Script Debugger and Netscape Script Debugger Ways to manage cross-browser issues How JavaScript interacts with XML and HTML

Who is this book for?

This book is for anyone who wants to learn JavaScript programming. You should have some understanding of HTML and how to create static Web pages, but no prior programming experience is necessary.


Author Notes

Paul Wilton. After an initial start as a Visual Basic applications programmer at the Ministry of Defense in the U.K., Paul found himself pulled into the Net. Having joined an Internet development company, he spent the last 5 years helping create Internet solutions and is currently working on an e-commerce website for a major British bank.
Paul's main skills are in developing web front ends using DHTML, JavaScript, VBScript, and Visual Basic, and back-end solutions with ASP, Visual Basic, and SQL Server. Currently, in between web development projects, he is learning Palm OS programming.


Table of Contents

Introductionp. xix
Chapter 1 Introduction to JavaScript and the Webp. 1
Introduction to JavaScriptp. 1
Tools Needed to Create JavaScript Web Applicationsp. 4
The [left angle bracket]script[right angle bracket] Tag and Your First Simple JavaScript Programp. 5
A Brief Look at Browsers and Compatibility Problemsp. 12
Introducing the Trivia Quizp. 14
Summaryp. 18
Chapter 2 Data Types and Variablesp. 19
Types of Data in JavaScriptp. 19
Variables--Storing Data in Memoryp. 22
Setting Up Your Browser for Errorsp. 28
Using Data--Calculations and Basic String Manipulationp. 35
Data Type Conversionp. 45
Arraysp. 49
The Trivia Quiz--Storing the Questions Using Arraysp. 58
Summaryp. 61
Exercise Questionsp. 62
Chapter 3 Decisions, Loops, and Functionsp. 63
Decision Making--The if and switch Statementsp. 64
Looping--The for and while Statementsp. 84
Functionsp. 92
The Trivia Quiz--Building One of the Basic Functionsp. 97
Summaryp. 100
Exercise Questionsp. 102
Chapter 4 JavaScript--An Object-Based Languagep. 105
Object-Based Programmingp. 105
The JavaScript Native Objectsp. 111
Summaryp. 155
Exercise Questionsp. 156
Chapter 5 Programming the Browserp. 157
Introduction to the Browser Objectsp. 158
Summaryp. 183
Exercise Questionsp. 185
Chapter 6 HTML Forms--Interacting with the Userp. 187
HTML Formsp. 188
HTML Elements in Formsp. 191
The Trivia Quizp. 228
Summaryp. 233
Exercisesp. 235
Chapter 7 Windows and Framesp. 237
Frames and the window Objectp. 238
Opening New Windowsp. 257
Securityp. 270
Trivia Quizp. 271
Summaryp. 288
Exercise Questionsp. 289
Chapter 8 String Manipulationp. 291
Additional String Methodsp. 292
Regular Expressionsp. 297
The String Object--split(), replace(), search(), and match() Methodsp. 312
Using the RegExp Object's Constructorp. 322
The Trivia Quizp. 323
Summaryp. 330
Exercise Questionsp. 330
Chapter 9 Date, Time, and Timersp. 333
World Timep. 334
Timers in a Web Pagep. 347
The Trivia Quizp. 357
Summaryp. 363
Exercise Questionsp. 364
Chapter 10 Common Mistakes, Debugging, and Error Handlingp. 365
I Can't Believe I Just Did That: Some Common Mistakesp. 365
Microsoft Script Debuggerp. 371
Netscape Debuggingp. 391
Error Handlingp. 400
Summaryp. 411
Exercise Questionsp. 412
Chapter 11 Storing Information: Cookiesp. 415
Baking Our First Cookiep. 415
Creating a Cookiep. 427
Getting a Cookie's Valuep. 431
Cookie Limitationsp. 437
Cookie Security and IE6p. 438
Summaryp. 443
Exercise Questionsp. 444
Chapter 12 Dynamic HTML in Early Browsersp. 445
Style Sheetsp. 446
Dynamic HTML in Internet Explorer 4.0+p. 454
Dynamic HTML in Netscape Navigator 4.xp. 489
Cross Browser IE 4.0+ and NN 4.x DHTMLp. 514
Summaryp. 519
Exercise Questionsp. 520
Chapter 13 Dynamic HTML in Modern Browsersp. 521
Why Do We Need Web Standards?p. 522
The Web Standardsp. 524
The Document Object Modelp. 527
Writing Cross-Browser DHTML Using the DOMp. 557
Summaryp. 580
Exercise Questionsp. 580
Chapter 14 JavaScript and XMLp. 583
What Is XML Used for?p. 583
The Basics of XMLp. 584
Altering the Look of Our XMLp. 602
Manipulating XML with JavaScriptp. 613
Summaryp. 624
Exercise Questionsp. 624
Chapter 15 Using ActiveX and Plug-Ins with JavaScriptp. 627
Checking for and Embedding Plug-Ins on Netscape Navigatorp. 628
Checking For and Embedding ActiveX Controls on Internet Explorerp. 634
Using Plug-Ins and ActiveX Controlsp. 638
Summaryp. 646
Exercise Questionp. 647
Chapter 16 Server-Side Scripting with ASPp. 649
What Is Server-Side Scripting?p. 649
Personal Web Server (IIS)p. 651
Introduction to Active Server Pagesp. 667
ASP Objectsp. 673
Trivia Quiz Goes Server-Sidep. 713
Summaryp. 719
Exercise Questionsp. 720
Chapter 17 Databasesp. 721
A Brief Guide to Databasesp. 722
Accessing Databases from a Web Pagep. 746
Trivia Quizp. 770
Summaryp. 795
Exercise Questionsp. 796
Appendix A Exercise Solutionsp. 797
Chapter 2p. 797
Chapter 3p. 799
Chapter 4p. 803
Chapter 5p. 807
Chapter 6p. 812
Chapter 7p. 818
Chapter 8p. 826
Chapter 9p. 829
Chapter 10p. 833
Chapter 11p. 836
Chapter 12p. 841
Chapter 13p. 850
Chapter 14p. 853
Chapter 15p. 856
Chapter 16p. 858
Chapter 17p. 870
Appendix B JavaScript Core Referencep. 885
Browser Referencep. 885
Reserved Wordsp. 885
JavaScript Operatorsp. 887
JavaScript Statementsp. 893
Top-Level Properties and Functionsp. 898
JavaScript Core Objectsp. 900
Appendix C JavaScript Client Referencep. 923
Browser Support for JavaScriptp. 923
Operatorsp. 924
Statementsp. 924
Eventsp. 924
Top-Level Functionsp. 926
Objectsp. 926
Appendix D Latin-1 Character Setp. 949
Indexp. 957