Chapter 10 in textbook.

CGI - all cleverness on the server's side of the connection

JavaScript - a way of programming the browser's behaviour

No connection with Java. Name reflects marketing decisions

Comparison with Java:

When to use one or the other: Compatibility issues with IE and other browsers
JavaScript originally developed for Netscape browsers

Example, more short examples.

JavaScript Syntax

References, Tutorials

Literal Values



Logical Values



Type Conversions

Variables & Assignment Operators and Expressions Comparisons and Conditional Statements Loops Defining Functions JavaScript Arrays JavaScript Objects Working with Built-In Objects JavaScript Events
Event           Description         Relevant for                 

onLoad             [1]              documents, framesets
onUnload           [2]              documents, framesets
onSubmit           [3]              forms 
onClick            [4]              radio, check, submit, links
onFocus            [5]              text fields, passwords, etc. 
onBlur             [6]              text fields, passwords, etc. 
onChange           [7]              text fields, scrolling, select
onMouseOver        [8]              hypertext links 
onSelect           [9]              text fields
Where description is one of the following: y
  1. document loaded into browser
  2. document unloaded from browser
  3. submit button pressed in a form
  4. user has clicked on an element
  5. form field has become active
  6. form field has become inactive
  7. form field has changed
  8. mouse is over the element
  9. the selected are of a field has changed
The window object The document object The form, form elements object(s) Anchors, links Other JavaScript Objects Applications
Simple Example