----- Original Message ----- From: "Daniel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 3:39 PM Subject: Javascript and JSP Question?
> Hi All, > > I have a Srting array Object > > String[] str = a.getCity(); //returns an array of City > > > I have a Javascript Code here > <script language="javascript"> > var arrCity = new Array(); > > for(i=0; i<<%=str.length%>;i++) > I want to put all the elements in the str array Object into arrCity > Javascript array Object.(i.e.) arrCity[i] = ? > > </Script> > > <script> var arrCity = new Array( <% if(str != null && str.length > 0) { for (int i = 0; i < str.length - 1; i++) { %> " <%=str[i]%>", <% } // for }//if %> "<%= str[str.lenght - 1]%>" ) </script> > Is this possible? Or Is there any work around for this? > > Regards > Daniel.E > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com