Downloading and Extracting the Example Files
Before doing any of the case examples in the book, you first need to download the ZIP file containing the example files for your platform and then extract its contents so you can use them:
Download the Example Files
Windows, on the one hand, and Macintosh OS X and Linux/UNIX, on the other hand, use different text file formats. Windows text files insert a hard return (or terminate a line) by inserting a carriage return and a line feed, while Macintosh OS X and Linux/UNIX insert only a line feed. Classic Macintosh systems (OS 9 or earlier) insert only a carriage return - this book does not support using the Classic Macintosh (OS 9 or earlier) to complete this books case examples.
Separate ZIP files for Macintosh OS X or Linux/UNIX are provided for download:
How to Download the ZIP Files
To download a ZIP file to your computer, just click on the file link. Depending on your settings, your browser will 1) automatically download the file to your browser's default folder for downloads or 2) prompt if you want to save the file to a location on your computer.
You can also right-click on the file link and select Save Target As (in Internet Explorer), Save Link As (in Mozilla Firefox), or Download Linked File (in Safari)
If the ZIP file downloads without prompting you to save it, you will need to go to the default download folder for your browser to find the downloaded file. To specify that you want to be prompted to save a file when downloading, in Mozilla Firefox, select Tools, Options, and Main, and select the "Always ask me where to save files" radio button; in Safari, select Edit, Preferences, and General, and check the "Always prompt before downloading" check box.
ZIP files are natively supported as compressed folders in Windows (XP, Vista, and Windows 7), as well as in Macintosh OS X. Double-clicking on a ZIP file will open it just like a non-compressed folder, unless you have installed a third-party utility that can uncompress ZIP files (such as WinZip or Stuffit Expander). Just copy the contents - the HTML_Examples folder - to another location on your computer (the Desktop, for instance) and use it as your working folder.
If you are using Windows and have not installed a third-party utility that can uncompress ZIP files, for specific instructions see Uncompressing ZIP Files in Windows below.
If you are using Macintosh OS X and have not installed a third-party utility that can uncompress ZIP files, for specific instructions see Uncompressing ZIP Files in Macintosh OS X below.
If you are using Linux or UNIX, for specific instructions see Uncompressing ZIP Files in Linux or UNIX below.
Uncompressing ZIP Files in Windows
If using XP, Vista, or Windows 7, you do not need additional software to open and extract the contents of a ZIP-format file:
- Double-click on the ZIP file. If you are prompted to open a third-party program (such as WinZip, for instance), go to Uncompressing ZIP Files Using Third-Party Programs.
- Click "Extract all files" in the Folder Tasks list to start the Extraction Wizard. Click Next.
- Specify the location where you want to extract the example files, by keying a drive letter (C:\, for instance) or clicking Browse. Click Next.
- After the files have been successfully extracted, click Finish. The HTML_Examples folder will be extracted to the location you specified.
Uncompressing ZIP Files in Macintosh OS X
If using Macintosh OS X, you do not need additional software to open and extract the contents of a ZIP-format file:
- Double-click on the ZIP file and the Finder will create a new uncompressed folder with the same name. Open the folder and copy or move the HTML_Examples folder to where you want to work with it (to your Desktop or a memory stick, for instance).
- If you are prompted to open a third-party program, go to Uncompressing ZIP Files Using Third-Party Programs.
Uncompressing ZIP Files in Linux
Linux and Unix users might be able to use the Unzip or Uzip command to unzip a zip file. For instance, key "unzip HTML_Examples-MacOSX-Linux.zip" to unzip the contents of that file.
Using Third-Party ZIP Programs
Many users prefer using third-party software to create or extract ZIP files. See brief instructions below for using WinZip (for Windows) and Stuffit Expander (for Mac OS X and Windows). Third-party software programs that can extract the contents of ZIP files include:
Macintosh OS X:
Using WinZip (Windows)
WinZip is a shareware software program for Windows that can open and extract the contents of ZIP-format files. To extract the contents of a ZIP file:
- In My Computer or Windows Explorer, navigate to the ZIP file you downloaded and double-click on it. When the WinZip program opens, click I Agree.
- Click the Extract button. Specify where you want to extract the files. For instance, to extract an HTML_Examples folder to the D: drive (d:\HTML_Examples\), key "d:\" in the Extract to box and click Extract.
Using Stuffit Expander (Macintosh OS X and Windows)
Stuffit Expander (for Macintosh OS X and Windows) is a freeware software program that can open and extract the contents of ZIP-format files. To extract the contents of a ZIP file:
- Find the ZIP file you downloaded and double-click on it. Select Stuffit Expander and click Open.
- In the same location as the ZIP file, find the HTML_Examples folder which Stuffit Expander created.
- If not already at the location where you want to use it, move the HTML_Examples to the location where you want to use it (the Desktop or a memory stick, for instance).
Working with the Example Files
If you have downloaded and extracted the example files, in the resulting HTML_Examples folder you will find separate folders (chap01, chap02, chap03, and so) that contain the example files for each chapter.
Thus, if you are working creating a case example in Chapter 3, you need to save any files you create for that chapter to the chap03 folder in the HTML_Examples folder. You can move the HTML_Examples folder wherever you like, as long as you remember where you put it.
If you find that images used in the case examples are not displaying in your browser, the likely reason is that you are not saving your HTML file in the correct folder (where the example graphic and other files for that chapter are located).