This will create something like <script> arrayVar[0]=0; </script> <script> arrayVar[1]=1; </script> <script> arrayVar[2]=2; </script> <script> arrayVar[3]=3; </script>
What you probably want is this: <html:form name="myForm" action="bla-bla" type="bla-bla"> <script> <logic:iterate name="myProperty" id="id1" indexId="x" type="java.lang.String[]"> arrayVar[<bean:write name="x" />]=<bean:write name="id1" /> </logic:iterate> </script> </html:form> which will produce <script> arrayVar[0]=0; arrayVar[1]=1; arrayVar[2]=2; arrayVar[3]=3; arrayVar[4]=4; arrayVar[5]=5; </script> --- You want some sample code, alright here you go: <html:form name="myForm" action="bla-bla" type="bla-bla"> <logic:iterate name="myProperty" id="id1" indexId="x" type="java.lang.String[]"> <script> arrayVar[<bean:write name="x" />]=<bean:write name="id1" /> </script> </logic:iterate> </html:form> Regards Puneet </html:form>On Mon, 23 Dec 2002 Eric C. Hein wrote : >I have a form "myForm" with a property "myProperty" that is a >String array. I want to set a javascript array to the contents >of a myProperty. I think I need to use an iterate tag in >combination with the <bean:write/> tag but I cannot figure out > from the javadocs how to do this. > >Can anyone post some sample code? > >Thanks > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

