I tried this:
<logic:iterate id="el" name="reallySimpleForm" property="names" indexId ="i"> Name: <bean:write name="el"/> <html:link href ="javascript:subForm(document.forms[0],'del','<%= i.toString() %>');"><bean:message key="link.delete"/></html:link><BR> </logic:iterate> but that just generates links of: javascript:subForm(document.forms[0],'del','<%= i.toString() %>'); instead of javascript:subForm(document.forms[0],'del','0'); How can I get scripting variables inside the html:link href attribute? Thanks Rob Rob Breeds/UK/IBM@ To: "Struts Users Mailing List" <[EMAIL PROTECTED]> IBMGB cc: Subject: links to javascript with index variables 15/11/2001 22:58 Please respond to "Struts Users Mailing List" In my ActionForm I have a collection of names which is added to dynamically. If I want to give each name its own delete link I'm doing this with iterate: <logic:iterate id="el" name="reallySimpleForm" property="names"> Name: <bean:write name="el"/> <html:link href ="javascript:subForm(document.forms[0],'del');"><bean:message key ="link.delete"/></html:link><BR> </logic:iterate> (where subForm is a JavaScript function to submit the form, and set an action, of 'del' in this case) but how do I add an index value into the javascript call for the link? To generate something like: <html:link href="javascript:subForm(document.forms[0],'del', 0) (last param being the index) <html:link href="javascript:subForm(document.forms[0],'del', 1) <html:link href="javascript:subForm(document.forms[0],'del', 2) . . . Is the only way to do this using scriptlets? Thanks Rob Breeds -- 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]>