For some reason, I can\'t get this to work.
My options list is populated dynamically using these scripts:
function addOption(selectId, value, text, sele
Here is another way you can change the selected option of a element in javascript. You can use
document.getElementById('salesperson').selectedIndex=1;
Setting it to 1 will make the second element of the dropdown selected. The select element index start from 0.
Here is a sample code. Check if you can use this type of approach: