• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

jsp javascript

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

my code that is calling a javascript function addRow but i am not able to create a drop down list in that new row i am getting a list in a string array

---------------------
'<%for(int i=0;i<batchList.length;i++){%><select name=btch><options name=<%=batchList[i]%><%=batchList[i]%></options><%}%></select>',
----------------------
this line in above code is troubling me since two-three days if any body can plz let me know wat i am doing worng...i know jsp elements get resolved during compile time so why still this line is not able to work wat i want

Rgds
Rishi Chopra
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a Servlets question so moved to the JSP forum.
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<%
for(int i=0;i<batchList.length;i++){%><select name=btch><options name=<%=batchList[i]%><%=batchList[i]%></options><%}%></select>',
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try this

<select name=btch>
<%for(int i=0;i<batchList.length;i++)
{%>
<options name=<%=batchList[i]%>><%=batchList[i]%></options>
<%}%>
</select>
[ December 08, 2005: Message edited by: Babar Qadri ]
 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
change your code from
this
<%
for(int i=0;i<batchList.length;i++)
{%>
<select name=btch>
<options name=<%=batchList[i]%><%=batchList[i]%></options>
<%}%></select>',


to

<select name=btch>
<%
for(int i=0;i<batchList.length;i++)
{%>
<options name=<%=batchList[i]%><%=batchList[i]%></options>
<%}%></select>
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic