CIS 1.0/Biomedical Computing
HW Unit C, Part I
The assignment is due (both parts) on Wednesday October 25, 2006.
- For this assignment, you will create two HTML files in
Notepad. Type your name in the files and your email
address as comments.
- Save your work!!! BEFORE YOU LEAVE THE LAB, make sure that
you save your work (both HTML files and any images files you
use) by storing them on a USB flash drive or by mailing them
- When you are completely finished with all the steps, zip
all your files together and email the zip file to me as an
Instructions for using WinZip are available.
- My email address is: firstname.lastname@example.org.
BE SURE TO ASK IN THE LAB IF YOU NEED HELP WITH ANY STEPS!!!!
PART I. CREATING DYNAMIC HTML.
- Start up Notepad.
- Look at
first form example
from Unit C.
- Modify the example so that it uses four different buttons,
labeled "RED", "BLUE", "GREEN" and "YELLOW".
Note that you must give each button a different name as
well as value (i.e., the button label is what is displayed on
- Modify the onclick function call for each button so that when
you click on each button, a window pops up and displays a
message like "you clicked on the RED button" (or something
more creative than that), instead of the message "hello".
Whatever message you use, it must contain text that indicates
which color button you clicked on and the message must be
different for each button!
- Save the file and name it with your last name followed by
the .html extension.
For example, my file would be called parsons.html.
Remember to tell Notepad not to put the "txt" extension after ".html"!
- Try opening the file with a browser and see how it works.
If any of the elements above don't work, go back into the
Notepad window, and edit the file to fix them.
The reload the file in your browser.
Keep doing this until everything works just perfectly :-)
- Open a new file in Notepad.
- Look at the first form example and the image map example
from Unit C.
- Modify the examples so you have
an image map that uses this image
file and when you click on each colored square, an alert box pops
- Replace the href=... sections of each
<area...> tag with onclick=alert('...').
You can fill in the argument to the alert()
function using the text you put in the previous step.
The argument is the text between the single quotes ('),
in the case of form example, the argument is 'hello are we done yet'.
Note that you will need to update the size of the image in the
<img...> tag and the corresponding coordinates in
each <area...> tag.
Also note that you will need to create a fourth
<area...> tag since there are four colors in the
- When you save this file, name it with your last name, followed by
the number 2, followed by the .html extension.
For example, mine is: parsons2.html.
Part II (worth 3 more points) will be available in class on Wednesday