This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Populating Array values into the JavaScript function on click of a select box  RSS feed

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a Map<String,String[]> which is populated in the jsp as below:

<select id="selectTemplate" name='templateSelected' onchange="getSelectedTemplateValue(this.value)">
<c:forEach items="${templates}" var="templates">
<option value="${templates.value}">${templates.key}</option>

Now I want to get the value which is a String[] on select of the id in the above code. I am trying multiple ways to get the String[] of the selected id from the select dropdown into my javascript function of getSelectedTemplateValue and display all the elements of String[] in an alert.

Please help me in this requirement which helps me alot.
Happily living in the valley of the dried frogs with a few tiny ads.
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!