Using the Rest of this tutorial
The rest of this tutorial is in four parts. Part I, immediately following this chapter, documents the standalone JavaScript language. This is the core language common to both client-side and server-side implementations of JavaScript. Chapters 2 through 5 begin this section with some bland but necessary reading--these chapters cover the topics necessary when learning any new developing language.
- Lexical Structure, explains the basic lexical structure of the language.
- Variables and Data Types, documents the data types supported by JavaScript and also covers the related topics of literals and identifiers.
- Expressions and Operators, explains expressions in JavaScript, and documents each of the operators supported by JavaScript. Experienced C, C++, or Java developers will be able to skim much of this chapter.
- Statements, describes the syntax and usage of each of the JavaScript statements. Again, experienced C, C++, and Java developers will be able to skim some, but not all, of this chapter.
The next four chapters of this first section become more interesting. They still cover the core of the JavaScript language, but document parts of the language that will not already be familiar to you, even if you already know C or Java. These chapters must be studied carefully if you want to really understand JavaScript:
- Functions, documents how functions are defined, invoked, and manipulated in JavaScript.
- Objects, explains objects, the most important JavaScript data type. This chapter includes a discussion of creating objects and defining object methods, among other important topics.
- Arrays, describes the creation and use of arrays in JavaScript.
- Further Topics in JavaScript, covers advanced topics that were not covered elsewhere. You can skip this chapter the first time through the tutorial, but the material it contains is important to understand if you are ever to become a JavaScript expert.
Part II of the tutorial documents client-side JavaScript. The chapters in this part document the web browser objects that are at the heart of client-side JavaScript, and provide detailed examples of their use. Any interesting JavaScript program running in a web browser will rely heavily on features specific to the client-side. You should read chapters 10, 11, and 12 first. After that, you can read chapters 13 through 20 in any order you choose, although you'll probably get the most out of this part if you read them in the order they are presented.
- Client-Side Program Structure, explains the various ways in which JavaScript is integrated into web pages for execution on the client side. It also discusses the order of execution of JavaScript programs and the event-driven developing model.
- Windows and the JavaScript Name Space, documents the most central and important object of client-side JavaScript, the Window object. It also covers issues related to this Window object, such as the name space, variable lifetime, and garbage collection.
- Developing with Windows, discusses and illustrates specific developing techniques using the Window object.
- The Navigator, Location, and History Objects, documents the Navigator, Location, and History objects and shows examples of using them.
- Documents and Their Contents, explains the Document object, which is perhaps the second most important object in client-side developing. It also illustrates developing techniques that use this object.
- Saving State with Cookies, illustrates the use of "cookies" to save state in web developing.
- Special Effects with Images, explains the Image object and demonstrates some special graphical effects you can produce with JavaScript.
- Forms and Form Elements, documents the Form object, another very crucial object in client-side JavaScript. It also documents the various form element objects that appear within HTML forms, and shows examples of JavaScript developing using forms.
- Compatibility Techniques, discusses the important issue of compatibility in JavaScript developing. It discusses compatibility between Navigator and Internet Explorer, between different versions of Navigator, and between JavaScript-enabled browsers and browsers that do not support the language.
- LiveConnect: JavaScript and Java, explains how you can use JavaScript to interact with Java classes and objects, and even communicate with and control Java applets. It also explains how you can do the reverse--invoke JavaScript code from Java applets.
- JavaScript Security, provides an overview of security issues in JavaScript. It explains the steps taken to plug security holes in Navigator 2.0, and the new "tainting" security model that is forthcoming in Navigator 4.0.
Part III is the reference section that makes up the second half of this tutorial. It contains complete documentation for all JavaScript objects, methods, properties, functions, and event handlers, both for core and client-side JavaScript.
Finally, Part IV is a section of appendices that you may find useful. They include lists of commonly encountered bugs, a list of differences between JavaScript in Navigator and Internet Explorer, and other helpful information.