If I use the html; text property the only diff would be <html:text property="<%="benefits["+index.intValue()+"].value"%>" size="20" onblur="<%=jsFunction%>"/>
I still have the same problem. If I put this in then the value becomes [object] Thanks -----Original Message----- From: vijay venkataraman [mailto:[EMAIL PROTECTED] Sent: 04 May 2006 13:12 To: Struts Users Mailing List Subject: Re:[OT] calling js function with list backed form value In your JS function can you add 'this' as one of the parameter. Then in your js function you can get the value from the element. Like <input type="text" onclick="return someFunction(this)"/> which implies the element on which the event occured. Note: I have never used <bean:xxx tags> and don't know much about it. My thoughts. Thanks, Vijay Venkataraman Shoukat, Faisal wrote: >Hi, > >I have a list backed action form and want to call a javascript function with >one of the parameters to the function being a value from the list backed >action form. > >My js function is as such: > ><bean:define id="jsFunction"> > javascript:calculate('<%="benefits[" + index.intValue() + "].value"%>', > '<bean:write name="benefit" property="benMaxRange"/>', > '<bean:write name="benefit" property="benMinRange"/>', > '<bean:write name="benefit" property="benRange"/>', > '<bean:write name="benefit" property="label"/>') ></bean:define> > >The value I want substituted into the function is <%="benefits[" + >index.intValue() + "].value"%> > >My input text tag is as such which calls the function: > ><input type="text" name="<%="benefit["+index.intValue()+"].value"%>" >value="" size="20" onblur="<%=jsFunction%>"/> > >Can anyone help with explaining how to get the value from the input text box >of the form and send it to the function. The text boxes name is dynamic thus >causes me problems. > >The html source shows the following: benefit[0].value in the function and >not the actual value. > >Thanks > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > ------------------------------DISCLAIMER------------------------------ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -------- The Northgate IS Content Screening and Inspection system has scanned this message for malicious and inappropriate content and none was found. Please take care when opening attachments even when these are expected and from known and trusted sources. ---------------------------------------------------------------------------- -------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]