|
Using Server-Side Imagemaps on Your Web Site
Untitled Document
Using Server-Side Imagemaps
on Your Web Site
Why use Imagemaps?
Imagemaps -- images with clickable active regions, each
linking to a different resource (web page, script, ftp site, etc) -- allow authors to
convey important visual information in creative ways. A vendor with stores in several
cities might have an imagemap showing where each location is geographically; when a
visitor selects an area of the map, the details of that location might be shown. Other
content providers might use an imagemap to establish a certain "feel" for their
site; a consumer electronics company, for instance, might make its front page an
entertainment center, with each section referring to one of its branches (audio, video,
etc).
This document discusses how to create server-side imagemaps. There is another type of imagemap, the client-side
imagemap, that is supported by FrontPage and other HTML editing programs. See your program's documentation for more
information.
This image has an imagemap. Click on the eye of the horse
to get a surprise.
Adding Server-Side Imagemaps to Your Web Pages
Create an imagemap using NCSA format. If you'd like
an editor to do the dirty work of creating the map file, there are several
available.
- Put the image and the image map in your "www" directory.
If you're uploading with an FTP client, BE SURE TO UPLOAD YOUR MAP FILE AS
TEXT!! If you do not, your imagemap will not work, because the server will get confused if
the map file has embedded newlines.
- If you're using EarthLink's FileManager to upload the files, they
should transfer fine; Macintosh users may have to take one extra step.
Add markup like this to your html file
Click on the information resource you wish to see:
<A HREF="image.map">
<img src="image.gif" ismap>
</A>
|
Your image.map file might look like this:
default badchoice.html
rect choice1.html 15,8 135,39
rect choice2.html 245,86 504,143
rect gopher://rs5.loc.gov/11/global 117,122 175,158
|
Uploading Map files with a Macintosh
If you are using a Mac Text editor, upload the map file as Text format in
your FTP program. If you use BBEdit, save it with UNIX line feeds and
then upload it using EarthLink's FileManager or an FTP program (using text or raw format, it
doesn't matter which).
The Web servers are UNIX machines and they write text files
differently.
On a Mac the line feed command is ^M in the UNIX world it's ^L.
Notice how this Mac file looks on a unix server:
this is a test file^Mthis is a test file^Mthis is a test
file^Mthis is a test file
|
This is how it looks on a Mac:
this is a test file
this is a test file
this is a test file
this is a test file
|
When you use the Text format in Fetch it converts your line feeds.
By saving a file with UNIX line feeds in BBEdit it creates your file
with the appropriate line feeds and the conversion is not neccessary.
Uploading with EarthLink's FileManager
If you've saved the map file in UNIX text format, you won't have a
problem. If it was saved as Mac text, you need to make an extra step after you've uploaded
the map file.
From FileManager, - Select the edit link for the map file - Press
the Change button
You don't need to actually edit anything, pressing the Change
button will convert the file to Unix text format.
|