[Logo]
Forums Register Login
putting values from ArrayList to optionlist/dropdownlist
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 :

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.
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.
anyone please ?
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.
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss


This thread has been viewed 4720 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 22, 2018 03:08:52.