How would I use JS to select the <option> dynamically?
Basically I have a class (java) that dynamically pulls a list from a database, puts it in <option> tags and spits it back to my jsp file, so I need to set which one is selected after they’ve been displayed, but need to do it without touching the html, cause i can’t.
This make sense?
basically after the select is created i want to set the selected option.
Bleh, sorry for the 3 replies, but I really have no idea how to call a JS function outside of an onClick, onLoad etc events.
I just want to call this mid-page, since the page’s content is dynamic and I’d get JS errors by calling it onLoad if the form/element didn’t exist (which it won’t half the time).