imap. Getting mouse click coordinates

$form:imap

If a visitor clicked on an image with attribute ISMAP, such a construction returns
hash with fields x and y containing mouse click coordinates.

Example

In file /go.html you write:
$clicked[$form:imap]
^if(def $clicked){
    Visitor clicked on ISMAP link:<br />
    x=
$clicked.x
<br />
    y=
$clicked.y
<br />
}

In file
/test.html you write:
<a href="/go.html?a=b"><img src="map.png" ismap /></a>

Open
/test.html in your browser and click on the picture. You will go to…
/go.html?a=b?10,30

…and you will see…
    Visitor clicked on ISMAP link:
    x=10
    y=30



Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 21.09.2007