Custom JSP taglib lets you provide Ajax-based hyperlinks. This tag mimics HTML hyperlinks
for Ajax based requests. Tag asynchronously requests your server side (JSP, servlet) and
replaces document's body (or some div/span area) with the response. For example:
<script language="JavaScript" src="cjajax.js"></script> <%@ taglib uri="taglib.tld" prefix="a" %> <a:AjaxLink href="/cj/testLink.jsp" title="link">Ajax Link</a:AjaxLink> In order to use this tag you have to describe an external JavaScript file cjajax.js on your page. 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. By default tag replaces document's body. An optional attribute targetId
lets you provide a CSS/DHTML id for the area that will be updated. An optional attribute
handler lets you provide your own JavaScript function that will accept the
requested data. This function will get two parameters: obtained text and obtained XML document:
<script language="JavaScript"> function myHandler(txt, xmlDoc) { your own processing for the requested content } </script> Tags are: AjaxLink Body tag defines Ajax-based hyperlink. Parameters are: 1) href Optional parameter. Describes an URL for your requests.
for downloading: Library: ajaxlinktag.jar Description: taglib.tld JavaScript library: cjajax.js See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|