403 247-2457  

 

Introduction to JavaScript by R. Berdan

Pre-requisite: HTML & Web Page Design or equivalent knowledge of basic HTML programming. SAIT requires previous training in C programming, but Science & Art will teach the program without this pre-requisite.

Course Objective: This introductory course on JavaScript will show students how to use and insert a variety of useful JavaScripts to enhance the appearance and functionality of a web site. Scripts will include banners, image rollovers, clocks, countdowns, password protection, age verification etc. By the end of the course students will be able to modify and write simple JavaScripts for their web sites.

Text: Tom Negino and Dori Smith (latest edition) JavaScript for the World Wide Web, Visual Quickstart Guide. Peach Pit Press ISBN - 0-201-69648-7.

Evaluation: to be based on a written exam 60% and assignments 40%

1. Get acquainted with JavaScript

Outcome: Students will place simple JavaScripts into a web page. ,

Objectives:

1.1 Understand how JavaScript differs from HTML and JAVA
1.2 Script tags & comment tags
1.3 Where to put your scripts in an HTML document
1.4 How to hide scripts from old web browsers
1.5 How to put comments in scripts
1.6 JavaScript dot syntax, braces, semicolons
1.7 Output messages to the screen - document.write()
1.8 Alert boxes
1.9 Confirm boxes & Prompt boxes

2. Variables, Expressions and operators

Outcome: Students will create variables, assign values to the variables and use them in JavaScript expressions.

2.1 Variables
2.2 Data types
2.3 Literals
2.4 Expressions
2.5 Operators
2.6 Netscape JavaScript debugger

3. Decision Structures

Outcome: Students write scripts using basic decision structures including if, if\else and conditional if statements.

3.1 Conditional statements and decisions
3.2 Conditional if
3.3 if statements
3.4 if\else statements
3.5 Switch statement
3.6 parseInt()
3.7 JavaScript calculator
3.8 Image rollovers

4. Loops

Outcome: Students will write and modify scripts using for and while loops and simple functions.

4.1 For Loops
4.2 While Loops
4.3 Continue and Break statements
4.4. Functions
4.5 Function parameters
4.6 Return statement
4.7 Recursive functions

5. Objects and the Object Hierarchy

Outcome: Students will write and modify scripts using javascript objects.
5.1 Objects
5.2 Object Hierarchy for Netscape and Internet Explorer
5.3 Generic Objects, String, Date, Math
5.4 Arrays
5.5 Countdown scripts

6. Forms & Event Handlers

Outcome: Students will write scripts that process information input into forms.

6.1 Form tags and objects
6.2 Event handlers
6.3 E-mail validation
6.4 Password protection

7. Exam - 3 hours MCQ (closed book) and a practical test - students will write several scripts (Open book).

 

 

     Lecture Notes

     Lecture 1 - PDF
     Lecture 2 - PDF
     Lecture 3 - PDF
     Lecture 4 - PDF
     Lecture 5 - PDF
     Lecture 6 - PDF

     Javascript Resources

     Javascript Source
     Script Archive
     Mouse Trailer scripts
     Brown U - tutorials
     Echoecho.com- tutorials
     Netscape resource
     Simple Scroller script

 

Checkers Game
made with Javascript
See if you can beat the program!