Window taglib ver. 1.1

    Custom JSP taglib lets you create JavaScript windows. Tag treats own body as content for some JavaScript popup and creates JavaScript function for opening such a window. For example:
 


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

<w:Window script="true" name="f">

 <html>
 <head>
 <title>Test window</title>
 </head>
 <body>
  <center>
  <b>Are you Ok?</b>
  <p><input type="button" value='Close' onClick="window.close()">
  </center>
 </body>
 </html>

</w:Window>

<p><input type="button" value="Test"
  onClick="f('width=150,height=100,menubar=no,scrollbars=no,resizable=no,top=100,left=100');">

Here tag creates a function f you can use later in your code:

Parameter for this function describes the settings for your window. Depends on the attribute settings in your tag you call the created function with or without parameters.

Tags are:

Window

Body tag creates a JavaScript window. Parameters are:

1) name Describes a name for your JavaScript function
2) settings Optional parameter. Describes the attributes for your window. E.g.: width=150,height=100,menubar=no,scrollbars=no,resizable=no,top=100,left=100
3) script Optional parameter. Possible values are true or false. If this value is true tag will wrap the output with a <script> tag. Default value is false.

for downloading:

Library: windowtag.jar    Description: taglib.tld

 © Coldbeans       Comments?

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