- Go Beyond the Static Web Page
- Our Example: Pictures from the Florida Keys
- What You Will Need
- Design the Page
- Test the Page
- How It Works
- Add What Dreamweaver Doesn't Know
- Final Thoughts
Our Example: Pictures from the Florida Keys
In this example, you're going to use Dreamweaver CS3 and JavaScript to create a randomly generated graphic that will change each time the site is opened or the page refreshed. This example employs images of locations in the Florida Keys. Images are named key1.jpg through key6.jpg and are placed within a folder named Keys.
Click here to download the site folder (named keySite), which contains the test page and all the images and code used in this exercise. To activate the site, download the folder; then define it as a new site in Dreamweaver by clicking the Site menu and selecting New Site.
In the Florida Keys example, JavaScript code enables you to create a mathematical statement to generate a random number, and then use that number to insert a random image into an HTML-driven Web page. Sounds like fun, so let's get started.