BIT 116 - Scripting
Assignment 1

Due: Monday, January 14th

Using JavaScript to Write HTML

           

            You are not allowed to work in groups this assignment.  For this assignment, you should start, finish, and do all the work on your own.  If you have questions, please contact the instructor.

 


Part 1:

In the <head> of A1_Story.html

In the <body> of A1_Story.html

An Example

Yesterday I made some of my special green play-dough for Ian to protest with. It's a big hit with Ian, who protests and protests and also likes to make things out of it - like a screwdriver and an iron, and then made a life-sized replica of Mom. Then Ian mashed most of it back into a cylinder but smeared some of it all over the markers, Mom, and the family bluebird. It took me an afternoon to get the play-dough out of the markers and the bluebird, but Ian, Mom and I had a lot of fun.

Part 2:

You will need to hand in the file you modified back in Part 1 as it's own, separate file.  However, in this part, you will build on what you did in Part 1, so save a copy of your work from part 1 as A1_Story_Part2.html, and continue working on that new file.

You now have at your disposal some mechanisms that allow you to use JavaScript to create more dynamic web pages: variables, especially string variables, and the alert(), prompt(), and confirm() boxes.

For this assignment, you are going to revisit the story from part 1, but from a different angle. This time, the web page is going to generate a story for someone else - the person who downloads the web page. Your page should retrieve the appropriate information from the user using prompt() and/or confirm() boxes: each of the variables that you simply assigned values to in Part 1, you will now ask the user for here in part 2.

Here are the restrictions for this assignment:

What to hand in:

  1. Your modified A1_Story.html
  2. Your A1_Story_Part2.html

How To Hand In Your Homework:

Refer to the "Homework Submission Guidelines" on the course website.  We will go over this, in class, on the day that this assignment is due.