"); } else { $mime_type = "text/html"; header("Content-type: $mime_type; charset=utf-8"); } ?> CS-90.3 Assignment 1

CS-90.3 Assignment 1

Reading

Start reading the “Simply JavaScript” text. Read all of chapters 1 and 2. We will be covering this material in class (statements, variables, and data types) in class, but it is important to read it in the book first.

The Assignment

Your assignment is to log into your account in the course’s laboratory as demonstrated in class. See the TREE Lab Information web page for information on how to do this if you didn’t follow it in class.

After you log in, start Dreamweaver and fix your site’s document root and images directory paths so they contain your account name instead of “prototype.” Be sure the only message you get from the site manager is the one about rebuilding the site cache. Anything else has to be fixed before proceeding. Again, this was demonstrated in class; you may need to seek help if you didn’t follow the procedure then.

Duplicate template.xhtml by selecting it in Dreamweaver and typing Ctrl-D. Then change the file name of the copy to index.xhtml.

Be sure to spell and capitalized the new filename to be exactly, “index.xhtml” (all lowercase letters). If you don’t do this right, you may not find out until I look at your assignment on my computer.

Change the title and level-1 heading of your index file to something that includes the possessive form of your name. The apostrophe in the title must be entered using the right-single quote character entity (’)

Create a script file named assignment_01.js in your site’s scripts directory, and add an alert() function call that will display a message, such as “Hello, World!” when the page loads.

Test Your Code

Use the Firefox browser to view your web page using the fully qualified domain name of the computer you are working on for the host name part of the URL. The pathname part of the URL is ~ (tilde, the character on the key in the upper left corner of the keyboard) followed by your account name.

The previous paragraph is important. You cannot look at your web page just by clicking on it. That sends the page to the browser without going through the PHP processor on the server, and the browser will wail and gnash its teeth woefully if you try to do this. Also, it will not work.

  1. Be sure the web page displays properly with your custom page title appearing at the top of the browser window and your new page title displayed with a “curly” quote mark for the the apostrophe in your name.
  2. Be sure the annoying “Hello World!” message shows up when you load your page!
  3. Validate your web page by clicking the XHTML link. Be sure you get the green “no error” message, and that the page is identified as XHTML 1.1 and UTF-8.

If any of your testing fails, you have to fix the problem before submitting the assignment.

Be sure to log out of your account when you finish the assignment so your work will be copied to the server where I will be able to access it.

Submit

When you are ready for me to look at your assignment, simply send me an email message to let me know. I’ll copy your entire web site to my computer (babbage) and check it out. The full pathname to your web site on babbage will be http://babbage.cs.qc.cuny.edu/Grading/903/ followed by your account name.

Send your email message to me at: vickeryatbabbage.cs.qc.cuny.edu by midnight of the due date.

The Subject line of your email message must be: “CS-90.3 Assignment 1.”

Don’t forget to put your name in your email message!