JavaScript Lessons
D. Baggs, Annapolis, MD - Last updated on February 28,2000

Here are my assignments
Exercises-examples


Week One: Introduction

JavaScript is a client-side language- the code resides within the Web page. It is a hybrid between a programming language and a markup language - the former because it provides a set of instructions, the latter because it is less strict.
    Self-Review Questions
  1. JavaScript is a compact, object-based scripting language which allows the viewer to interact.

  2. JavaScript was invented by Netscape with Sun Microsystems

  3. JavaScript is different from Java as follows:
  4. JavaScript may lead to ECMAScript (European Community Manufacturer's Association) and it can write a text-based cookie.

  5. It does not access and control a user's computer.

Week Two: Week Three:
Adding Interactivity:

Objects:
    Things which have unique names. Similar to a noun.
Properties:
    Can modify objects and are like sub-objects.
Methods:
    What objects do Similar to a verb.
Dot Syntax:
    Used to put together objects, properties, and methods.

Event Handlers
onAbort
onBlur
onChange
onClick
onError
onFocus
onLoad
onMouseover
onMouseout
onSelect
onSubmit
onUnload
Values and Variables
Value
Piece of information - numbers and strings.
Value Types
Consist of number, string, boolean, null, object, and function.
Operators
Symbols that work with variables. Examples are math functions.
    Review Questions:
  1. Objects are things
  2. Properties are characteristics which can modify objects
  3. Methods are things objects can do - actions
  4. Dot syntax puts together objects, prop's, meth's
  5. Event handlers are actions visitors perform - commands
  6. Values are information - numbers/strings
  7. Variables contain values
  8. Operators are symbols that work w/variables
Back to top

Week 4:   Exercises

Week 5: Review:

Examples in Assignments
Alerts, prompts and confirms are three methods of the window object.
They create predefined, popup types of dialogue objects within a window object.

Clicking OK in an alert box makes the box disappear.

A prompt box has a space for writing.

A confirm box has a question.

A function is a set of Java statements that perform a task.
It is made up of the word function followed by the name, parentheses,
and an open brace bracket, statements, and a closing brace bracket.

Week 6: Review:

Example in Assignments
A window opened with HTML will give the same size as the main window. JavaScript gives more control over size and properties.

type=full window opens new window on entire desktop with only the title bar.

Popups can be invoked using graphic link by using img src tag
Week 7: Review:

Without a check for recognition of images for navigation, a user wouldn't be able to go anywhere.
The mouseover event calls the image defined in over1, etc. list and creates a message in the status bar.
Onmouseout calls the image defined in off1, etc. list.
Preloading images helps because you have twice what you see at first.
Example Drop-Down Menu in Assignments
Exercises - Example of Mouseover

Back to Web Design
Back to top