Imagemap Sample

Web Server/400 has built-in support for servicing image map requests. Image maps are clickable GIFs that can be used as links in the same way as hypertext. For example, this toolbar is an imagemap (note: imagemaps are only available in browsers that support inline images):

The HTML used to display this imagemap is:

<A HREF="/qsys/WWWCGI/imagemap/Sample"><IMG SRC="/Shipped/Footbar.gif" ISMAP></A>

In addition to specifying the ISMAP attribute for the image, the anchor must point to the name of an image map. This name is then used to look up a corresponding map file in the global imagemap configuration file.

In the image map above, the name of the image map is Sample. This name is then looked up in the file imagemap.cfg, which contains the following line:

Sample: /WWWServ/Cfg/Maps/Sample.map

Web Server/400 then looks in the map file /WWWServ/Cfg/Maps/Sample.map to determine what URL should be mapped to the click, based on the location of the click.

This file describes the different regions of the image that can be clicked on and which document to retrieve for each region. Sample.map contains the following:

rect /shipped/index.html 0,0 102,37
rect /shipped/mtinet.html 102,0 202,37
rect /shipped/mtsupp.html 202,0 302,37
rect /shipped/copyrght.html 302,0 407,37

The four rectangular regions represent the different 'buttons' in the image map and the document to retrieve when a button is clicked on.

For more information on image maps, please see the documentation.



Home | Sales | Support | © I/NET, Inc.