so..
<a href="javascript: closeWindowWithCode('<bean:write name="signal" property="code" >')">
or
<a href="#" onlclick="closeWindowWithCode('<bean:write name="signal" property="code" >')">
or
<a href="#" onclick="closeWindowWithCode('<c:out value="${signal.code}"/>')">
Cheers Mark
On Thursday, October 16, 2003, at 02:57 PM, Frederic Dernbach wrote:
How can I call a javascript function with one parameter using a <logic:iterate> tag (the parameter being different from row to row).
Below is a simple JSP snipplet which uses an iteration. Its first item prints a "code" property with an hyperlink with a "onclick" attribute that points to a javascript function with ONE parameter (closeWindowWithOK).
As you can see, I would like to pass the "code" property to the javascript function when the link is clicked on.
How can I do this ? How should I write the "onclick" attribute of the
<html:link> tag ? Obviously waht I write is wrong since I do not get the
expected result.
Thanks in advance for your help.
Fred
<script type="text/javascript">
function closeWindowWithCode(myparameter) { opener.updateWith(myparameter); window.close(); } </script>
<table width="650" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <th>Code</th> </tr> <logic:iterate name="searchSignalForm" property="signals" id="signal" type="com.rubis.web.system.bean.SignalBean"> <tr align="left"> <td> <html:link href='' onclick='closeWindowWithCode(<bean:write name="signal" property="code"/>)' > <bean:write name="signal" property="code"/> </html:link> </td> </tr> </logic:iterate> </table>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

