JavaScript variable taglib ver. 1.2

    Custom JSP tag helps you integrate JSP and JavaScript. Body tag jsvar lets you wrap own body into JavaScript function. So you will be able to use the content generated in your JSP fragment right from JavaScript (e.g. in your Ajax application).

For example:

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

<j:jsvar name="f">
  now it is in JavaScript

and after that you can use function f() in your JavaScript code. This function will simply return the text, presented in tag's body.

Tags are:


Body tag wraps own body into JavaScript function. Parameters are:

1) name Describes a name for your JavaScript function
2) header Optional parameter. Possible values are true or false. If this value is true tag will generate <script> brackets also. Default value is true.

for downloading:

    Library: jsvartag.jar    Description: taglib.tld

 © Coldbeans      Comments?

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

Also in Coldtags: