I have javascript, which is in iframe. When i check radio button in iframe, on parent window change value. It working perfect on firefox, but not on IE... Can someone help me with this problem?
<script type="text/javascript">
function getCheckedValue(radioObj) {
if(!radioObj)
return "";
var radioLength = radioObj.length;
if(radioLength == undefined)
if(radioObj.checked)
return radioObj.value;
else
return "";
for(var i = 0; i < radioLength; i++) {
if(radioObj[i].checked) {
return radioObj[i].value;
}
}
return "";
}
function asd(){
var qwer = getCheckedValue(document.forms['uas'].elements['icon']);
window.parent.document.forms['register'].lang.value = qwer;
window.parent.document.getElementById("images").getElementsByTagName("img")[0].src = "images/lang/" + qwer + ".png";
}
</script>
<form name="uas" method="GET" action="" onchange="asd();">
<label id="1"><input type="radio" name="icon" value="1">One</label><br><label id="2"><input type="radio" name="icon" value="2">Two ...