I have the following code, which works perfectly in Chrome/FF:
chkbx_send_demo.onchange = function(){
if(sel_template.selectedIndex <= 0 && ch
my JS code is now something like this:
if(navigator.appName == "Microsoft Internet Explorer"){
alert("IE");
chkbx_send_demo.onclick = function(){
alert("HI");
if(sel_template.selectedIndex <= 0 && chkbx_send_demo.checked == true){
alert("Choose a Template");
sel_template.selectedIndex = 1;
}
if(chkbx_send_demo.checked == false){
alert("HI");
sel_template.selectedIndex = 0;
}
alert("HI");
}
}
else
{
chkbx_send_demo.onchange = function(){
if(sel_template.selectedIndex <= 0 && chkbx_send_demo.checked == true){
alert("Choose a Template");
sel_template.selectedIndex = 1;
}
if(chkbx_send_demo.checked == false){
sel_template.selectedIndex = 0;
}
}
}
No javascript errors, but the code just isn't executed on IE and i really can't understand why.