This page demonstrates the ability to implement client-side image-maps
entirely in VBScript. Move your mouse over items in the image-map below
and notice how the text box updates to indicate the item that the mouse is
over. (NB: For purpose of this demo, navigation is turned off when you click
on a link.)
How it's done
The document contains an anchor named link1 . We define a VB procedure
hooked up to the mousemove and test to see what part of the image the pointer is in,
taking actions as appropriate.
Sub link1_MouseMove(s,b,x,y)
last_x = x
last_y = y
if (InRect(x, y, 5, 30, 120, 85)=true) then
DescribeLink "A full description of Microsoft's product line"
Else ...
We remember the last x and y coordinate clicked on so that in the click
event handler (which doesn't take x and y argumets) we can decide where
the user wants to go.
"View Source" on this document for full details on how its done.