I have a dynamically created select option using a javascript function. the select object is
<
You're overthinking it:
var country = document.getElementById("country"); country.options[country.options.selectedIndex].selected = true;