Last update: Jan 12 1998

[ Lynx Friendly Logo ] Lynx Friendly Server-side Imagemap


I'm afraid that I have installed a client-side image map locally, so I cannot offer a working example at this site anymore. However, I will leave these pages up for those of you insterested in making server-side image maps.

Server-side imagemaps which work with Lynx? Yes, it is definately possible...

NCSA's imagemap.c program uses a pair of coordinates to determine where a mouse was clicked. Lynx users cannot interact with an imagemap since they send either a value of 0,0 or no coordinates at all, arriving at the site's default page -- if one was defined.

Well, a colleague of mine ( Joshua Bell, now at joshb@microsoft.com ) took a moment to make a simple modification to the imagemap.c source file. If either of the above conditions occur, instead of parsing out which link to follow from the map file, the program gathers all of the URLs from the map file and presents them to the user. Since the URLs in this map file are non-descriptive, the program modification allows another column to be added to the map file in a form such as:

        datatype    URL    coordinate pairs    "Menu text"
or
        datatype    URL    "Menu text"          coordinate pairs

Now, Lynx users can select the imagemap link and get a breakdown of everything it would link to, while graphical browsers still have the slick image to work with.

And, for the sake of completeness, if combined with a default file that offers the URL breakdown, any difficulty in selecting a link can be avoided. Since each imagemap should normally have a default page to go to when none of the defined regions is chosen, this page should contain a simple plain text link which passes no coordinates to the imagemap program in order to return the breakdown of the map file URLs.

I would highly recommend the use of this modified NCSA imagemap.c source to anyone.

Furthermore, the mod_imap.c source under Apache (1.2b10) now supports the same modification:

/* ...
 * Support for creating non-graphical menu added.  (backwards compatible):
 *    Old:  directive URL [x,y ...]
 *    New:  directive URL "Menu text" [x,y ...]
 *     or:  directive URL x,y ... "Menu text"
 * Map format and menu concept courtesy Joshua Bell, jsbell@acs.ucalgary.ca.
Congratulations, Joshua. :-)

If you're interested in seeing an example, feel free to examine the files used to implement an imagemap for a Star Trek information archive:

If you run under CERN and have made a similar modification to the htimage.c file, please feel free to let me know so I might include the necessary information here.


Lynx Friendly 100% NOTscape Certified Best Viewed With Any Browser Lynx Now! Valid HTML 4.0!
D. Joseph Creighton <Joe_Creighton@UManitoba.CA>