Area taglib ver. 1.3

    Custom JSP tag area mimics HTML img tag so you can obtain mouse cursor's position into an image within your server side code. You have to use this tag inside of our Form taglib or within HTML forms. For example:
 


<%@ taglib uri="taglib.tld" prefix="im" %>

<form name="myForm" method="post" action="submit.jsp">

<im:area name="map" formName="myForm" width="200" height="200" image="myBigMap.jpg"/>

</form>

Here your visitor will be able to click somewhere on the picture myBigMap.jpg and in your submit.jsp file you will be able to read mouse cursor's position by this way:
 


X: <%=request.getParameter("map_X")%>
Y: <%=request.getParameter("map_Y")%>

Names for parameters with coordinates will be defined by name parameter in area tag.

Tags are:

area

Implements img tag with the ability to track mouse cursor. Parameters are:

1) image Describes an URL for your image.
2) name Optional parameter. Describes a name for this area. You must use this parameter if you have more than one area within the same page. This parameter will define names for request parameters with coordinates. Default value for this parameter is area (so request parameters will be area_X and area_Y).
3) formName Optional parameter. Provides a name for your HTML form. You do not need this parameter if area tag will be used with our Form taglib.
4) width Optional parameter. Describes a width for your image
5) height Optional parameter. Describes a height for your image
6) border Optional parameter. Describes a border for your image. Default value is 0.
7) alt Optional parameter. Describes an alternating text for your image
8) cursor Optional parameter. Describes a CSS cursor for your image. E.g.: crosshair, arrow etc. Default value is hand.

for downloading:

Library: areatag.jar    Description: taglib.tld

In order to use this taglib you have to download Form taglib also.

© Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.