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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Values not poulating in the dropdown box.

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
I am actually referring this webpage to dynamically change the values in the dropdown. Here he values are given in the javascript itself. But what i am trying to do is take these values from the property file and setting it in the array. The values are not getting dispalyed in the down. Please see below the jsp code. Help me please.

[ December 06, 2008: Message edited by: renu richard ]
 
author & internet detective
Posts: 41855
904
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Renu,

This code is in a JSP scriptlet. Which means the country, city and place are just getting written to the HTML page loose. You can view the source in your browser to verify.

The example you linked to does this in JavaScript. So what you need to do is write out the JavaScript and insert the scriptlets to fit the two together. For example:
JavaScript: countries[0]['country']='United Kingdom';
JSP : countries[<%+ i %>]['country']='<%= countries[i][country] %>';
 
Sheriff
Posts: 67745
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:
  • Report post to moderator
Please do not pots the same question more than once.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic