Assignment 4 – Due February 25th, 2009
Must be submitted to WebCT
to receive credit
This assignment will be out of 1000 possible points.
browser software to add buttons, menus, etc.
click on the hello_java.html link below, the script should run, now right
click on the web page (the part running the program) and select
“view source”. This will load up Notepad, or your
default text editor, with the source code. Now just do a “save
as” to “hello_java.txt” to your machine. You can
now edit the file and when ready to test it do a “save as” to
- So click on this hello_java.html
to get started.
click on the hello_java.html file on your machine to test that it works
PLAY with the web page
before you edit it
READ the web page source before you edit it
There are MANY comments
in the file.
The comments describe what statements are doing.
homework should work in the following web-browsers: Internet Explorer, Firefox, and Safari.
You will need
to add your name and login so we know who you are: Use a text editor (notepad
your full name where "My name is:"
your login where it says "My login is:"
You will need
to add the current date – which
should update to reflect whatever day it is when viewed. (100 points)
script that accomplishes this is given in the comments of the file.
the comments carefully. They
will explain what to do.
Modify the file
so that it is possible to say two more things
like “person’s name”
love “person’s name”
this portion you will need to add the appropriate entries in two places
You will need to add two options to the pull-down menu (50 points each
– total of 100)
there are the options “Hate” and “Hello”
two more, such as “Love” and “Like”
you will need to add two cases to the function my_function
(50 points each – total of 100)
means that when the user selects “Love” and
“Like”, they display appropriate responses when the user
The pulldown menu only shows one item at a time. I would like
to see two items displayed at a time. (100 points)
The textbox for
the NAME should be lined up with the menu below it. Add spaces to push the
textbox to the right (100 points)
in the source code. I already added a couple of spaces.
spacing need not be perfect, just closer.
There is a link
which points to my web page, it has several problems which you will fix. The
link is the text which says Place your mouse on and off of this
the background color.
When the mouse first hovers over the text, the
background will turn yellow. Make
it turn pink instead.
After moving the mouse off the text, the
background remains the same color.
Alter this so that moving the mouse off the text changes the background
to blue. (100 points)
The command for turning the background blue
works the same way as the code that changes it to yellow (or pink), except it
reads “onMouseOut” instead of “onMouseOver” (100 points)
the text Place your mouse on and off of this. Replace
this with text indicating that the person is going to your personal
webpage. (100 points)
the page is left (either by following the link or by exiting the
browser), it says Leaving so soon?
should say Have a nice
day instead. (100 points)
to WebCT your "hello_java.html" file
or you will not receive credit for the assignment
file is NOT the web site as it appears in explorer, but the source file
you changed which generates the web site. You must submit this file to WebCT.
sure to put YOUR FULL NAME in this file.
webspace. This is NOT a replacement for
submitting to WebCT. You must do BOTH.
file should be saved in your public_html
directory in your UCSC personal webspace
account at http://people.ucsc.edu/~username
should be a link added to your index.html with text "HI THERE"
that is EASY to see that will reference the java script. (100 points
you did not complete Assignment 3 and would still like to earn this
extra credit, you will have to make a simple web page with the
“HI THERE” link and upload it to your UCSC webspace.
This page does not have to have anything other than this link on