Weeks 6 & 7


Reminder of Various access issues


Beginning JavaScript

Using the input with simple scripts  Experiment on your own!

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 #5  -- due Monday March 20th  -- take text from two inputs inside a form and when the user clicks a button, concatenate the two strings (that the user has entered), placing the result in a third input. Make your page look (as much as you can) as follows:


Notes on assignment 5: 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.)


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.