NewtFire logo: a mosaic rendering of a firebelly newt
newtFire {dh|ds}
Maintained by: Elisa E. Beshero-Bondar (ebb8 at pitt.edu) Creative Commons License Last modified: Wednesday, 28-Nov-2018 16:13:40 UTC. Powered by firebellies.

Begin this exercise by carefully reading and testing the examples on Obdurodon’s introductory JavaScript Overview page. When you reach the section titled, Okay, Time to Write your First JavaScript, we’d like you to do just that: experiment with what you have learned so far by writing some JavaScript code to work within an HTML page you have prepared. Your page could be an HTML file you have generated for your project, or just a random page you write on the fly for the purposes of this assignment, but should not simply be a repetition of the model on the Obdurodon intro page. (Adapt what you’ve learned there to experiment a little on your own.) For more examples to tinker with, have a look at the JavaScript tutorial pages at w3schools. Don’t worry too much about making this complicated: We just want to see you write some functional JavaScript code.

Now, go on and do Obdurodon’s JavaScript Exercise 1, and if you like, adapt the sample code to fit into the page on which you have been experimenting. The goal here is to write a separate JavaScript file that you associate with your HTML (instead of applying JavaScript inline). If you have experimented with inline JavaScript as you were learning, see if you can express that JavaScript in functions in the separate file you are writing for this assignment. You may adapt this assignment as you wish to write some JavaScript for one of your project pages that makes something dynamic happen. (Note: we don’t permit the use of JavaScript libraries—just using someone else’s JavaScript and force-fitting it to your HTML—because we want you to write your own code independently and know what each line of it means. It is okay, though, to learn from JavaScript others have written and apply what you are learning to your project needs; in which case we want you to credit your source in comments in your JavaScript file (marked by // or within /* comment */ and be able to explain how you are applying it to your project.)

For JavaScript reading and experimentation, see:

What to upload, and where to upload it:

This assignment involves working within your personal webspace on newtFire, so that is where you will submit your homework for this assignment (instead of Courseweb). Use an SFTP program (the same you used for the HTML assignments earlier in this course), and

  1. Locate your personal folder on newtFire. (If you have trouble locating this, check on our Courseweb Announcements page for the information we posted earlier in the semester, and ask on our DHClass-Hub. While you are at it, make sure you review how to access your shared project space, too.)
  2. Upload your files for this assignment: the HTML, the JavaScript, any associated CSS here.

If you like, include some comments in your HTML and JavaScript files on what we should see and on what your JavaScript should be doing.