3/8/2011: Create an applet (and place in html document) that draws a happy face
Create an applet that toggles between a happy face and a sad face when you click a button.
2/24/2011: Write regular expression patterns to
validate a US 10 digit phone number, without '-'
validate a US 10 digit phone number, with or without '-'
validate a US 7 digit or 10 digit phone number, with or without '-'
break a String up at ',' or ' ' (will use the String method split)
2/22/2011: Use the array of objects you developed for the Assignment on 2/17
Initialize the array with 5 objects. Interests can be: 'sleeping', 'reading', 'coding', 'coffee'.
Output all the array's objects using
a for loop to step through the array, and for in to step through the properties.
Sort (see page 420, and here)
the data on gender and output the array.
Sort the data on interest, where 'sleeping' < 'reading' < 'coffee' < 'coding'.
2/17/2011: Create a slide show for an online dating site. A "prospect" has
the following fields: a picture, gender, location, interests. Preloading the images and
other data into a 1D array of Objects. Have two
buttons, "Run slideshow" and "Stop slideshow" to start and stop the slide show. Display
each Object, including image and all other data, for 1 second. Do not use document.write --
instead, use divs and spans.
2/15/2011: Extend the jumping jack animation here
so that either:
-- add a button to speed up jack, or
-- add y motion, or
-- bounce off the left wall and the right wall (instead of wrap-around).
2/10/2011: Exercise the ability to use HTML DOM:
1. Find a poem/song of 3 stanzas. Put each stanza in a separate HTML element (eg, div, p, td)
When some event occurs (your choice) rotate the stanzas USING THE DOM.
2. Lay down 2 divs. Each div has two buttons. In each div, one button labelled 'red', the other labelled 'green'.
Using the DOM, when user clicks appropriate button, change background color of
related div.
3. For #1 or #2, draw a tree of the DOM including ONLY element nodes and text nodes. 4. email me the url for these by 5pm tomorrow!
If scanning the picture is too time consuming, bring me paper on Tuesday.
2/1/2011: Two part problem:
(1) Using document.body.width and document.body.height (or other, e.g. innerHeight),
position
a sprite on the window at a random location.
Every 5 seconds, the sprite
moves to a different (random) location.
(2) Save the location to two cookies so that when you close, then reopen the window,
the sprite starts at the location it was last at.
1/25/2011: Modify your game board so that when you click on a square, it
changes from the current image to the sprite image (you could have as many as 16 sprites.
You may have developed your game board so that the onChange event used to change an img src attribute
is not natural. In that case, show me what you've got on the board without event handling.
1/20/2011 Start to make a game board. Find cartoony pictures for the following:
tree
rock
grass
water
a sprite
Lay down a 4 X 4 board with grass, at least 3 trees, at least 3 rocks, 2 water, and one sprite.
The sprite should be closer to the viewer than the landscaping (use z-index).
Grass should be furthest from the viewer. Sprite is closest.
After you lay down your first board, consider that only the sprite will be moving.
Implement your CSS using class, id, internal and inline in a way that makes sense.
Send me email with URLs for your first implementation and your second implementation.
Be sure to include your name in a comment at the beginning of your HTML file.
1/18/2011, INLAB Use CSS to style the links on your web page developed last time so that
visited links are black,
hover links are dark green, and
unvisited links are dark blue.
Use CSS to style a table showing the names of at least 4 people you know, how you know each, gender, approximate age.
1/11/2011, INLAB:
Create and upload an index.html file using html, head, title, body, img, a, hr and 5 more of the above tags or characters.
The index.html file I developed in class today is located here .
1/6/2011:
Activate your people account
Obtain an sftp client
Create an index.html file (see your email)
(If possible) Upload index.html to your people account
Java applet tutorial here
also talks about interface Java applet code with Javascript,
invoking applet methods from Javascript,
and accessing DOM information from the applet.