JavaScript Lesson

October 17, 2002

Some good references for JavaScript are:

JavaScript for the WWW (4th edition)

Core JavaScript Guide 1.5

Core JavaScript Reference 1.5

Doc JavaScript

Peter-Paul Koch's Javascript Site

Visual Quickstart Guide

Web Teacher

www.scriptsource.com

www.javascriptsource.com

http://javascript.internet.com

www.cnet.com/builder

Javascript — Pop up windows:

http://www.crays.com/jsc

http://tech.irt.org/articles/js128/


JavaScript is Object Oriented:


Consists of three parts:	OBJECTS,   METHODS,   PROPERTIES:


OBJECTS: a thing (NOUN / OWNER) Web page itself, table, form, button, image, link (Things that we interact with in scripts).
PROPERTIES: information ABOUT those objects (NOUN / OWNED) Things we can manipulate (window has title, form has a checkbox, cat has fur). * PROPERTIES Can Modify objects OR be applied to different objects... object.property cat.fur window.title cat.paws.front.left
METHODS: things the objects CAN DO (VERBS) buttons CLICK() windows OPEN() cats PURR() () parentheses indicate that we are referring to a method instead of a property. object.method(arguments) cat.meow() button.click()
EVENTS: How we trigger our functions to run Actions that the USER performs while on your page. Commands called Event Handlers ** IMAGES CANNOT HAVE EVENTS, but THEIR LINKS CAN!! **
JavaScript uses DOT SYNTAX (separated by dots) computer.disk.floppu window.status object.property cat.purr() onClick="run_my_function"() window.open(URL, name) onMouseOver document.write("Welcome to my page!") onLoad object.method()

JAVASCRIPT IS CASE SENSITIVE!!

RULES:

It cannot contain spaces or puncutation.

It cannot be the reserved JavaScript Words.


Back to Syllabus  |   Sound on the Web  |   Animated Gifs