JavaScript Programming
Course description
Overview: Students will learn how to program by using JavaScript 1.3.
Prerequisites: Students should take the Enhancing Web Pages with JavaScript course and have a strong familiarity with using the Internet or should have equivalent knowledge.
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.
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
Reading Data from Form Elements
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.