Weeks 5 - 9


Reminder of Various access issues


Beginning JavaScript

Responding to simple events

Variables in JavaScript -- names for nouns

commands in JavaScript -- rather like verbs

A simple HTML/JavaScript editor (written in HTML and JavaScript)

Forms, buttons, alerts 

<form name="f">

</form>


Assignment #4  -- due Monday October 19th -- take text from two inputs inside a form and when the user clicks a button, concatenate the two strings, placing the result in a third input. Make your page look (as much as you can) as follows:


Notes on assignment 4: The assignment involves the following things:

  1. making the page resemble the picture above (Hint: reread the material on HTML tables since there are relevant examples in there)

  2. figuring out how to use javascript to gather the value of a string the user has typed; (Hint: read this week's class notes on beginning Javascript since there are relevant examples in there.)

  3. figuring out how to concatenate two strings; (Hint if a="artichoke" and b="banana" than alert(a+b) produces "artichokebanana".)

  4. figuring out how to use javascript to display the value of a string inside an input within a form. (Hint: read this week's class notes on beginning Javascript since there are relevant examples in there.)


Upcoming Quiz: -Wednesday October 21st -- open book, open computer -- covering HTML, images, copyright, computing jargon, beginning JavaScript. Combination of short answer and essay (typically writing HTML/JavaScript)


JavaScript -- several examples to discuss:

example 1 This uses a button (within a form) to redirect the page to another URL.

example 2 This places two links on a page but overrides the action associated with one of them.

example3 This changes which of two images is displayed based on mouse clicks (down and up)

example4 This takes text typed by the user and builds a new sentence inside a new window.

example5 This example adds numbers together.


A preview of things to come:

Changing pictures: Image rollovers

Reading and writing inputs and pictures:

formname.inputname.value=string

imagename.src=filename


Assignment #5: Due: Monday November 2nd. .(Note: you'll want to start on this early): Create a web page containing three image tags (each containing a different picture), three input fields (each containing a different number) and a button. Whenever the button is clicked, all pictures and numbers move one cell to the right, with the exception of the rightmost elements which move to the leftmost position.

     Many faces of Aspasia

A fancier (but elegant) swapper

A link to some play with images, inputs and simple scripts.

A link to making a new verb in JavaScript