Simple JavaScript Examples:

A Simple Function

When you click the link below, a popup box asks a person for their name.  Once they give it, it asks them if they like your site.  If they click OK for yes, it thanks them, otherwise it harasses them with 3 popups.

Launch Example


A Popup Window

This example presents a map as an image with a link to a JavaScript function that pops a MapQuest window up when the image is clicked.

Map of Varden Technologies
(Click For Interactive Map and Driving Directions)


Changing the Source of an Image

Most sites have some sort of navigation setup that features images that change when you mouse over them.  An example is on the LoudOffice.com website.  The easiest way to do this is via a set of functions that a graphics program such as Fireworks creates for you, however it is possible to do this on your own.  Below is a very basic example: