Custom JSP tag. Renders a hyperlink with JavaScript. This taglib lets you use the values from your HTML forms as parameters for the hyperlinks. For example:
<%@ taglib uri="taglib.tld" prefix="go" %> <html> ... <go:jslink href="http://www.server.com/nextpage.htm" text="Next page"/> <go:jslink href="http://www.server.com/prevpage.htm">Link</go:jslink> ... </html> You can set a text for your hyperlink as a tag's body or through the parameter text or through
the special tag setText. Tag setParameter lets you define a GET parameter for the link
(value will be encoded automatically). For example this hyperlink will use the current value
for the user field in your form:
<%@ taglib uri="taglib.tld" prefix="go" %> <html> ... <go:jslink href="http://www.server.com/nextpage.htm"> <go:setText>Next page</go:setText> <go:setParameter name="A">document.forms[0].user.value</go:setParameter> </go:jslink> ... </html> With parameter function tag simply creates a JavaScript function that calculates the URL according to your parameters. A link itself would be not generated in this case. This feature lets you provide dynamically calculated URL's in our Ajax taglibs. Tags are: jslink Body tag renders JavaScript hyperlink. Parameters are: 1) href Optional parameter. Describes an URL. By default
tag will use the current URL (request URI).
setText Body tag defines a text for your hyperlink. Parameters are: none setParameter Body tag defines a parameter for your hyperlink. Parameters are: 1) name Describes a name for your parameter
for downloading: Library: jslinktag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|