aspose file tools*
The moose likes JSP and the fly likes putting values from ArrayList to optionlist/dropdownlist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "putting values from ArrayList to optionlist/dropdownlist" Watch "putting values from ArrayList to optionlist/dropdownlist" New topic
Author

putting values from ArrayList to optionlist/dropdownlist

Priya Yadav
Greenhorn

Joined: Jul 06, 2009
Posts: 2
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

Joined: Jan 10, 2002
Posts: 61437
    
  67

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

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

Joined: Jul 06, 2009
Posts: 2
anyone please ?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30780
    
157

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: putting values from ArrayList to optionlist/dropdownlist