How to make an imagemap - Server-Side Imagemaps
   
Home
 
Books
 
File Formats
 
Glossary
 
Software
 
Tutorials
     
GraphicsAcademy.com  >  Tutorials  >  Make An Imagemap  >  Chapter 1

How To Make An Imagemap

Chapter 1: Server-Side Imagemaps

With Server-Side imagemaps:
  • You place some code in your HTML pages and the image is displayed.

  • When the user clicks on the image, the X and Y coordinates of the click, relative to the top left of the image, are sent back to the web server.

  • The web server then needs to figure out how to respond.
The hard part is making your web server respond in the correct way to each click. The web server needs to figure out what to do based on the X,Y coordinate of the click.

You setup make the web server respond to the click either of two different ways:
  1. Either, you can make clicks on the image link to your own ASP, CGI, PHP script, and then develop your own script which responds in whichever way you want.

  2. Or, on some web hosts, it is possible to setup a text file specifying the coordinates of various regions on the image, and what happens when any particular region is clicked.

    Just to make this more confusing there are at least two different formats that this text file can be in, depending on your web host: NCSA and CERN. Check with your web host to see which, if any, of these formats they support.
I don't recommend using Server-Side imagemaps, because:
  • Every click on the image generates a separate request to the server.

  • The procedures for Server-Side imagemaps involve either writing your own scripts (too much work!), or depend on which particular web host you are currently using (and thus might need to be changed if you switch to another web host).

  • It is not possible to provide the user with any visual cues when they are moving their mouse over the imagemap. Instead, all they see is the status line of the browser contains the URL of the script with the X and Y coordinates as parameters. You can see what I mean by this, by looking at the imagemap below, and moving your mouse over it.
Here is Server-Side side imagemap (I haven't however bothered to make it actually work, a click anywhere on the imagemap will simply return you to this page, but you will be able to see the X,Y coordinates passed in the URL parameters if you click).

Server-Side Imagemap
(Not Functional)

Here is the HTML code used to generate that imagemap, with the two crucial parts shown in red:

<A HREF="howto_imagemap.php"><IMG SRC="imagemap.gif" WIDTH="250" HEIGHT="250" BORDER="1" ISMAP></A>
  • The first part in red is the URL of the script on the server to link to.

  • The ISMAP attribute tells the browser, that the linked image should be treated as a Server-Side imagemap, and that the X,Y coordinates should be sent to the server when the user clicks.
At this point, I'll move on, but if you want to read more: There is a tutorial on NCSA Server-Side imagemaps at http://hoohoo.ncsa.uiuc.edu/docs/tutorials/imagemapping.html



Related Software:
  • Trellian ImageMapper
    Trellian Image Mapper is the quickest way to create image mapped images for your website. Full support for hyperlinked rectangles, circles and even polygon regions is provided and you can import all your current image maps. After you have created your image map, Trellian Image Mapper will generate the required HTML code ready to be pasted directly into your favorite HTML editor. You can even use the built-in image map previewer.

  • Web Hotspots
    Software for creating Client-Side Imagemaps.

Related Web Sites:


  
How To Make An Imagemap:
 
 
  << PreviousIntroduction   1   2   3Next >>  
   
 
   
 
Privacy     Terms Of Use

Copyright © 2005-2008, Answers 2000 Limited

With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.

In Association With Amazon.com
All trademarks are property of their respective owners.
All third party content and adverts are copyright of their respective owners.

Some graphics on our web sites are Copyright (C) 1997-2000 Hemera Technologies Inc., and used under license. All such pictures are provided for viewing purposes only and are not to be saved or downloaded. All such pictures of recognizable individuals are models and used for illustrative purposes only, and not meant to imply any association or endorsement of said individual with any product or service.