Intro to
Internet
Technologies

Spring 2009
course
navigation

programming

Mention IE problem from last class.
Progress so far?
Discuss basic ideas of programming languages, and how those things look in javascript.
This looks like a reasonable intro workshop : http://www.math.grin.edu/~rebelsky/Tutorials/JavaScript/EdMedia97/intro.html
With some exercises : http://www.math.grin.edu/~rebelsky/Tutorials/JavaScript/EdMedia97/Exercises/play.html

basics

Discuss basic concepts in programming: variables, numbers, strings, lists, conditionals, loops, ...

more javascript tutorials and exercises

examples

Create a web page to display a randomly chosen picture.
Step 1 : make a list of the URL's for the pictures. Step 2 : put a random number into a variable Step 3 : use that random as a subscript into the list to get one of the pictures. Step 4 : modify the image tag in the html document to include that URL. 4a) document.getElementByID to get that part of the webpage 4b) modify the piece that has the image with one of these : * choice 1 : something.innerHTML = ... * choice 2 : imageObject.src = ... * choice 3 : document.write(...) with javascript in webpage itself // Return a random integer 1, 2, 3, ..., max function randomInteger(max){ return Math.floor(Math.random()*max) }
Try these various ideas in class ... which we did; I've attached the results.
http://cs.marlboro.edu/ courses/ spring2009/internet/ notes/ programming
last modified Friday April 10 2009 2:49 pm EDT

attachments [paper clip]

     name last modified size
[IMG]pic0.png Apr 10 2009 2:48 pm 558kB [IMG]pic2.gif Apr 10 2009 2:48 pm 3.36kB [IMG]pic3.jpg Apr 10 2009 2:49 pm 30.2kB [TXT]random_picture.html Apr 10 2009 2:49 pm 591B [TXT]sum.html Apr 10 2009 2:49 pm 361B