JavaScript Programming

Course specifications
Course number: 077 921
Software version number: 4.x+
Course length: 3 days

Hardware/software required to run this course
To complete the exercises and labs in this course, you will need both Internet Explorer and Navigator installed. Computers should have sufficient memory and hard-disk space to run both browsers simultaneously. We recommend at least 32 MB of RAM and 200 MB disk space (to hold the browsers). The course was written to run with Internet Explorer 4.0 and newer and Navigator 4.04 and newer. Use the latest versions available. Access to the Internet is not required during class. However, “field trips” to selected web sites, noted in places throughout the course, would require such access. See your reference manual for hardware considerations that apply to your specific hardware setup.

Course description

Overview: Students will learn how to program by using JavaScript 1.3.

Prerequisites: HTML Programming: Level 1 and a strong familiarity with using the Internet or equivalent knowledge.

Delivery method: Instructor-led, group-paced, classroom-delivery learning model with structured hands-on activities.

Benefits: Students will learn how to write JavaScript programs that use the latest language techniques (version 1.3). Students will also learn how to write programs that are compatible with previous versions of the language and are cross-browser compatible.

Target student: Students enrolling in this course should have a strong understanding of HTML programming and should have a basic familiarity with JavaScript. They should have examined scripts written by others and have implemented other people’s scripts on their web pages. This is a serious programming course for those students who want to gain a full understanding of this powerful programming language.

What's next: JavaScript Programming is the first course in this series. Advanced JavaScript Programming, the next course in this series, teaches students advanced language components and advanced programming techniques.

JavaScript Programming

Performance-based objectives
Lesson objectives help students become comfortable with the course, and also provide a means to evaluate learning. Upon successful completion of this course, students will be able to:

*	List the JavaScript syntax rules and implement good coding practices.
*	List the data and variable types that JavaScript supports, use the many control statements available in JavaScript, and create and use functions.
*	Describe object characteristics, use objects, instantiate objects, and create custom objects. 
*	Describe the purpose of the Document object and use its properties, methods, and event handlers.
*	Script with frames in mind.
*	Describe the purpose of the Form object and use its properties, methods, and event handlers to read and write to HTML forms.
*	Choose a general process for validating user input into web forms.
*	Validate user input into HTML forms including testing for required fields, numeric data and numeric data within a range of values specified, and string data.
*	Describe the purpose of the Date object, instantiate and use instances of the Date object to create clocks, count-down timers, and perform date math.
*	Describe the purpose of the Math object and use its constants and methods to perform mathematical operations.
*	Characterize the compatibility landscape and choose between the various techniques for dealing with potential incompatibilities. Detect browsers in order to create code that works around platform incompatibilities.

JavaScript Programming

Course content

Lesson 1: Getting Started with JavaScript
JavaScript Overview
JavaScript Programming Overview
Lesson 2: JavaScript Building Blocks—Variables and Operators
Variables and Data Types Overview
Using Variables and Data
Operators
Lesson 3: JavaScript Building Blocks—Control Statements
Controlling the flow – JavaScript Control Statements
Lesson 4: JavaScript Building Blocks—Functions and Objects
Functions
Objects
Lesson 5: The Window Object
The Window Object
Dialog Boxes
Status Bar Messages
Window Manipulations
Lesson 6: The Document Object
The Document Object
Writing to Documents
Dynamic Documents
Lesson 7: Working with Frames
HTML Frames Review
Scripting for Frames
Lesson 8: Working with Forms and Forms-based Data
The Form Object
Working with Form Elements and Their Properties
Lesson 9: Validating Form Data
A General Approach
Testing for Required Fields
Validating Numeric Data
Validating String Data
Lesson 10: Dates and Math
Overview of the Date Object
Using and manipulating Dates
Overview of the Math Object
Doing Math with JavaScript 
Lesson 11: Introduction to Cross-browser Compatibility
Examining the Compatibility Landscape
Detecting Browser and Platforms

Additional information: This course teaches cross-browser programming techniques, and thus requires both Internet Explorer and Navigator to be installed. Students will not be able to complete some exercises if they do not have access to both browsers.