Bookmark Topic Watch Topic
  • New Topic

Values not poulating in the dropdown box.

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • 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 ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35744
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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] %>';
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not pots the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!