guys!
I've been trying to get this solved for awhile, and I'm really stuck, so hoping for your help. This code works in Chrome and in Opera, but doesn't work in IE11. Don't know about other versions of IE. IE JavaScript is enabled. Please take a look, and tell me that I'm doing wrong
<script type="text/javascript">
window.onload = function(e){
var list = document.getElementsByClassName('example');
switcher_combo = list[0];
switcher_combo.disabled = true;
switcher_combo.addEventListener("change", myFunction);
function myFunction() {
alert("Changed!")
}
}
function SetSel(value)
{
switcher_combo.value = value;
switcher_combo.selected = true;
switcher_combo.dispatchEvent(new Event('change'));
return false;
}
</script>
<select id="example1" class='example' name='emaple2'>
<option value="1">Option one</option>
<option value="2">Option two</option>
<option value="3">Option three</option>
</select>
<BR>
<a href="javascript:SetSel(2);">Change Combo to #2</a>
</body>