• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

putting values from ArrayList to optionlist/dropdownlist

 
Priya Yadav
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am putting arraylist values in 1 dropdown list onclick of radio button, However it is putting "undefined" instead of values. I can not use Javabean since I will have 3 radio buttons.
ArrayList is coming from database.

My JavaScript :


In my JSP I have :

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on HTML, not JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.
 
Priya Yadav
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone please ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priya,
Welcome to JavaRanch!

positionnames is an array. When you print it out, you don't get the contents of the array. Try doing a 'view source' on the HTML generated by your JSP and looking at that line. It's not what you expect.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic