hey all,
i have a problem with radio buttons showing and hiding divs in IE. i can't figure out what the problem is. when i click on the radiobutton nothing changes. it's only when i click somewhere else, it changes. can someone tell me how i can change it instantly.
here is a my html sample:
and this is my javascript function:
nice detail, it does work in FF.
i have a problem with radio buttons showing and hiding divs in IE. i can't figure out what the problem is. when i click on the radiobutton nothing changes. it's only when i click somewhere else, it changes. can someone tell me how i can change it instantly.
here is a my html sample:
Code:
<form name='Sel'> <input type='radio' name='selector' value='val1' id='val1' checked=true onchange='Change()'/> //also tried onclick <label>val1</label> <input type='radio' name='selector' value='val2' id='val2' onchange='Change()'/> //also tried onclick <label>val2</label> </form> <div id='switchable1' style='display: block'> <p>val1</p> </div> <div id='switchable2' style='display: none'> <p>val2</p> </div>
Code:
function Change(){
if (document.Sel.selector[0].checked){
$("switchable1").style.display = "block";
$("switchable2").style.display = "none";
accessSQL=true;
}
if (document.Sel.selector[1].checked){
$("switchable1").style.display = "none";
$("switchable2").style.display = "block";
accessSQL=false;
}
}
Comment