Custom JSP taglib lets you provide Ajax-based alarm popups. Tag
asynchronously requests your server side (JSP, servlet) and outputs response as a JavaScript
alarm. For example:
No alarms will be provided for the empty responses.
In order to use this tag you have to describe an external JavaScript file cjajax.js on your page.
Attribute prefix lets you include taglib into your HTML controls. For example, the following code
may provide alarm when input filed gets a focus:
Url used for the server side request could be calculated in some JavaScript function. It is described in the attribute urlFunction. See JavaScript link taglib also.
Tags are:
AjaxAlert
Body tag defines Ajax-based alarm popup. Parameters are:
1) url Optional parameter. Describes an URL for your requests.
2) urlFunction Optional parameter. Describes a function that will return an url.
3) prefix Optional parameter. Describes an event for the alarm requests (e.g. onClick, onMouseOver etc.)
4) error Optional parameter. Describes a name for your own JavaScript function that will be called in case
of errors. By default is empty.
for downloading:
Library: ajaxalerttag.jar Description: taglib.tld JavaScript library: cjajax.js
See also Coldtags suite - the largest collection of custom JSP tags.