Hello there,
i have a small javascript that toggles one of two <div>'s from display:none to display: block. This works perfectly in every browser, except IE (obviously). Can anyone think why?
Here is the code:
the functions are called with an onClick event of a drop down menu item (<select> tag).
Thank you!
i have a small javascript that toggles one of two <div>'s from display:none to display: block. This works perfectly in every browser, except IE (obviously). Can anyone think why?
Here is the code:
Code:
function toggleDiv(id)
{
document.getElementById("optdiv1").style.display = "none";
document.getElementById("optdiv2").style.display = "none";
document.getElementById(id).style.display = "block";
document.getElementById("select_2").selectedIndex = 0;
}
function hideDivs()
{
document.getElementById("optdiv1").style.display = "none";
document.getElementById("optdiv2").style.display = "none";
}
Thank you!
Comment