Absolutely. Can you make that tag available now? Mark
-----Original Message----- From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 12:26 AM To: Struts User List Subject: Need some votes for improved Javascript support in Link Tag Hey all, I submitted an enhancement to struts. Read the following and if it sounds worth having in struts give me a vote on the developer's list or make some noise for some of the gurus to see. Here is the info on the tag: I don't know if a similar solution has been provided, but, I tweaked the Link Tag to support the writing of 'javascript:[function_name]([param1,param2,param3...])' to the href attribute of the final output. Here is a summarization of it's functionality: I added the following attributes: function - This is the name of the javascript function that will be called; functionName - This is the name of the bean that will provide parameter values from one of it's properties. functionProperty - This is a property of a bean that will either provide a String or an ArrayList to populate the parameters of the function urlIndex - This allows you to include the url generated by href,forward or page to be included at a specific place in the function's parameters. There is another class that I wrote that does the actual processing and preparation of the url. I named it EcmaUtil. I modeled the computeURL and computerParam methods of the RequestUtils class when I built the methods for the EcmaUtil. The LinkTag class that I wrote extends the BaseHandlerTag under the org.apache.struts.taglib.html package of struts jar. I know the code needs a bit of reworking to fit back in to the struts framework. I stripped out the MessageReources for the most part and removed some exception handling that will need to be included again. Anyways, if nobody has done this in the nightly or if it sounds like it might be of use. Let me know and I will post the code,the tld and an example of it's usage. EXAMPLE OF USAGE: This tag works exactly like the struts html tag with expanded feature outlined above: <pwshtml:link forward="listings/detail/popup" function="popUpWin" urlIndex="1" paramId="image" paramName="image"> <img src="image.jpg"> some text</pwshtml:link> This code will produce the follwing html <a href="javascript:popUpWin('/do/listings/detail/popup?image=NWMT203336.jpg')" ><img src="image.jpg"></a> Of course some of the elements are arbitrary to the values in your beans. But you should be able to traverse the code and get the idea. Thanks in advance. Brandon Goodin Phase Web and Multimedia P(406)862-2245 F(406)862-0354 http://www.phase.ws [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>