Writing scriptsUnit 3 |
|
JavaScript Samples |
|
Look at the samples, and view their source documents.
External file sample
Sample with an external file in the head, onclick, and pseudo-protocol
The html element: Sample 3-2 is very interesting. It shows we can build the entire content of a page entirely with JavaScript. More often, we set the page up using xhtml and add more content to the page using JavaScript. |
|
Firefox toolbar |
|
There is a Firefox toolbar, which helps in developing JavaScript. |
|
Lab 1 part C |
|
In lab 1 part C you will build one more page. It will contain JavaScript. |
|
Put your web page on the Internet |
|
|
Put your page on the internet, as you did with lab 1B. |
Test your page |
|
Validate your page before trying to get the JavaScript to work. Then make sure the JavaScript works. |
|
Complete lab 1 part C |
|
You have done all the work for part C of lab 1. |
|
Reading assignment |
|
Reading assignments are in the text book, Java Script, A Beginner's Guide, Second Edition, by John Pollock; McGraw Hill / Osborne, ISBN 0-07-222790-7
Read Module 2. We will not use the projects in the book; we will have our own lab assignments.
You may wish to do the Mastery Check at the end of each module; the answers are in the appendix. Case rules:
Skip the section titled "Hiding JavaScript Code from Older Browsers". This technique can cause some problems. It is better to put the JavaScript in an external file. Do not use <-- //--> to try to hide JavaScript. Alternate reading assignments are in the text book, Java Script Concepts & Techniques Programming Interactive Web Sites, by Tina Spain McDuffie; Franklin, Beedle & Associates, ISBN 1-887902-45-7 Read Chapter 2. Omit the section on Hiding Scripts from Old Browsers, which is becomming obsolete. Omit the section on Introducing the navigator Object, which we will do later. |
|
Lecture notes |
|
Do NOT read the lecture notes before hearing the lecture. If you do, you will find the lecture very boring. Read the lecture notes if you do not attend the lecture, or if you wish to review the material. |
|