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 ?
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.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java

This thread has been viewed 4948 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 16, 2019 15:26:59.