BareMetal.com

Baremetal
My Account
Domain Registration Management Services
Web Services
Rates and Specs
Bulk Rates
CGI Library
FAQ
Order Form
Tech Support
Billing Info
Company Info
Charities
Legal Info
Employment
Privacy Statement

BM


Web Services

Clickable Image Maps;

Return CGI Library

[Gadget MAP]

Image Map:

The basic idea is a line like the following:

<a href="/gadgets/gadgetmap.map">
<img ismap="ismap" src="/images/gadgetmap.gif" border="0" /> </a>

The first line starts an 'anchor' that includes your image. The image is defined with the ISMAP parameter and the anchor is ended after the image.

The server will then use the co-ordinates of the click and look up a URL to jump to in the specified file (/gadgets/gadgetmap.map) in the example above.

The following "/gadgets/gadgetmap.map" is the path to the map file...

The contents of that file are:

rect    /gadgets/variables.html 9,9 70,55
rect    /gadgets/counter.html 10,55 69,101
rect    /gadgets/formmail/formmail.html 9,103 69,145
rect    /gadgets/map.html 9,146 70,191
default /cgi-bin/nph-no_op.sh

The default action shown in the file is a special one. The server tells the client (browser) not to do anything, since the click was outside any of the active regions. The other shapes available are 'circle' (which takes a center and an edgepoint as co-ordinates), 'point' (which takes only one pair of co-ordinates), 'poly' (which takes an arbitrary number of co-ordinates), and the shown 'rect' and 'default' shapes. The point shape is only useful with other point shapes; the image map script simply finds the closest point and returns the corresponding URL.

The map file must have a name that ends in ".map".

Note, that the old use of /cgi-bin/imagemap/path_to_map_file.map is no longer supported as imagemap support has since been integrated into the apache web server.



 
Home Page    Domain Registration Services    Web Services    Technical Support
About Baremetal    Privacy Statement    Billing Info    Charities
My Account    Legal Info    Search BareMetal

Copyright © 1996-2012, BareMetal.com Inc.
Last updated: Thursday, 28-May-2015 16:14:59 PDT
Last Accessed from: 5.181.190.175
Questions and comments to support@baremetal.com