I'm trying to pass on a URL variable using Javascript and it works fine in Fire Fox but not in IE. I've been reading that IE7 has a problem with GetElementbyID but I don't know how to work around it using the code. Any help would be greatly appreciated.
<script type="application/javascript">
function link ( ) {
var urlout = "https://www.aarphealthcare.com/RequestInformation";
var urlquery = location.href.split("?");
var myNewVar = urlquery[1];
if(myNewVar){
urlout = "/Marketing/UHG/Landing/50to64/RequestInformation.aspx?"+myNewVar+"&products=EHI";
} else {
urlout = "/Marketing/UHG/Landing/50to64/RequestInformation.aspx?products=EHI";
}
document.getElementById('linkout').href=urlout;
document.getElementById('linkout2').href=urlout;
}
window.onload=function(){link()}
</script>