Reputation: 87
I am trying to create a dropdown list using struts. I want to load the option values in the select element from a javascript arraylist (say. a separate javascript file). How can I do so?
<s:select list="countries"></s:select>
I have seen an example that it can be done in plain javascript. How can I do so in struts select element?
Thank you.
EDIT : I want to populate the elements of the element using a javascript arraylist.
Upvotes: 1
Views: 699
Reputation: 160321
Same as with plain JavaScript; use the id
attribute and proceed normally.
Upvotes: 1