Try this, this should work. <logic:iterate name="addressListFormBean" id="choice" property="letterOptions"> <a href="javascript:setHiddenLetter('<bean:write name="choice" />'); document.forms[0].submit(); "> <bean:write name="choice" property="labelStr"/> </a> </logic:iterate>
-----Original Message----- From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:23 AM To: 'Struts Users Mailing List' Subject: RE: taglibs - nonstatic javascript value Varun, I've tried to put that in, but it still doesn't work: it cuts it when it comes to those double quotes, so, my href would be = "javascript:setHiddenLetter('". So, it doesn't like those quotes. I've tried removing them and putting them in single quotes, I'm back to that same problem. It reads the whole thing as one string. Please advice! Mona -----Original Message----- From: Varun Garg [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 12:06 PM To: 'Struts Users Mailing List' Subject: RE: taglibs - nonstatic javascript value I would just put a bean:write instead on the D. <logic:iterate name="addressListFormBean" id="choice" property="letterOptions"> <html:link href="javascript:setHiddenLetter('"<bean:write name="choice" property="labelStr"/>"'); document.forms[0].submit(); "> <bean:write name="choice" property="labelStr"/> </html:link> </logic:iterate> -----Original Message----- From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:50 AM To: 'Struts Users Mailing List' Subject: taglibs - nonstatic javascript value yes, it worked. I have one problem, though: passing dynamic value to the function I call in javascript. This is what I have: <logic:iterate name="addressListFormBean" id="choice" property="letterOptions"> <html:link href="javascript:setHiddenLetter('D'); document.forms[0].submit(); "> <bean:write name="choice" property="labelStr"/> </html:link> </logic:iterate> I would like to replace that 'D' with something like <%=choice%>, for the user to be able to select the letter (there are letter A through Z, and 'letter' is a hidden field). How can I do that? Mona -----Original Message----- From: Lynn Guy [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2003 4:35 PM To: Struts Users Mailing List Subject: RE: first time action put them in an html form tag then in your link do something like onclick=this.submit() <script> function doInsert() { document.forms[0].submit(); } </script> <html:form action="assetWorksheet.do" method="post" > <a href="javascript:doInsert()"> <html:img srcKey="image.button.createIncome"</a> </html:form> I think the name property for the html:form tag is no longer valid so forms[0] refers to the first form on my page. In your case you can probably use the html:link tag and put the javascript call in the onclick property. hth ************************************************************************ ***** The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. ************************************************************************ ***** --------------------------------------------------------------------- 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] ************************************************************************ ***** The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. ************************************************************************ ***** --------------------------------------------------------------------- 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]