Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Searching of indexes Up: Writing CGI scripts Previous: Processing input from


Processing image map input

Setting up image maps is discussed in Chapter gif. When the user clicks on an image map, the coordinates of the position clicked are passed to the server as a query string, which is appended to the URL. A script invoked by the server to process the request is free to do anything it wishes. It may ignore the coordinates if desired. It is usual to perform some sort of mapping based on the coordinates. If this mapping is to another existing document, the script can redirect the request by outputting a Location header.

An image map request can be serviced by any script, but there are programs distributed with the CERN and NCSA servers that are designed to handle the simplest cases. The htimage program is part of the CERN distribution and imagemap is part of the NCSA distribution. You do not have to use the program that came with the server. In fact it is fine to install both programs, or to use either of the programs with other servers.

The NCSA imagemap program requires all image maps to be registered in a central configuration file. By default this file is located in:

    /usr/local/etc/httpd/conf/imagemap.conf

This location may be changed when the program is compiled. The file consists of a set of image map names and the corresponding image map files. The format of each line is as follows:

    image-map-name : image-map-file-name

The CERN program takes the pathname of the image map file as a command line argument so this can be specified as the path info part of the URL.


next up previous contents index
Next: Searching of indexes Up: Writing CGI scripts Previous: Processing input from

[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd