<%response.buffer=true%> <% Response.Expires = 0 %> Examples: Writing For The Web

Example Files

Below are links to example files that we have built in class.  If You click on the file name, you can see an example of the file in action.  Click on the word SOURCE to open a word document showing the source code for the file.

File Name Function Notes/Source
Shows current year as part of page copyright.

Include this in a JS include file and keep all your pages up to date. SOURCE

Shows date in mm/dd/yyy format. Example of if/then syntax. SOURCE
Image/color/messages change based on hour of day. (Harnesses system clock) Demos if/else statement, document.bgColor, document.write.
Switches page content based on date (1-31, etc). Rotates content based on modulus. Demos switch statement, modulus operator.
Uses window.open to popup a page into a new window. Demos custom functions to vary window size, document location via anchor tags.
Demonstrates properties of the navigator object, and for/in looping example. Knowing the browser of the user can allow custom styles, etc.
Demonstrates various ways to create a "rollover" image effect. As long as your images are pre-loaded, how you roll the images is up to you!
Determines current page to create dynamic link navigation example.

Uses href property of location object, string handling and parallel arrays to tailor page navigation. SOURCE

We adapted the browser sniffer in class to demonstrate how to adapt code with a form, and a JS Function. Knowing the properties and methods of various objects on a page helps us learn JS.


Print this Page Back To Top

2000- <%=year(date)%> newMANIC INC, All rights reserved