Hi All,
I'm seeing a strange issue with my code below. The content received thru the xmlHttpRequest, is not being displayed in IE8, after clicking the link. It is displayed only after moving the mouse/cursor, after clicking the link. Anyone sees what could be the problem here ? Please help.
The css for 'element' is -
Many Thanks,
csoft
I'm seeing a strange issue with my code below. The content received thru the xmlHttpRequest, is not being displayed in IE8, after clicking the link. It is displayed only after moving the mouse/cursor, after clicking the link. Anyone sees what could be the problem here ? Please help.
Code:
<html>
<head>
<script type="text/javascript">
var xmlHttpfunction;
function ShowHint(id)
{
xmlHttp = GetXmlHttpObject();
if (xmlHttp == null)
{
alert ("Browser does not support HTTP Request");
return;
}
var url = "myurl.php";
url = url+"?id="+id;
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState === 4)
{
document.getElementById("elementRight").style.display = "block";
document.getElementById("elementRight").innerHTML = xmlHttp.responseText;
}
}
</script>
</head>
<body>
<div id="elementLeft">
<ul >
<li>
<a href="#" onclick="ShowHint("1");"> Item1 </a>
</li>
<li>
<a href="#" onclick="ShowHint("2");"> Item1 </a>
</li>
<li>
<a href="#" onclick="ShowHint("3");"> Item1 </a>
</li>
</ul>
</div>
<div class="element" id="elementRight">
</div>
</body>
</html>
Code:
.element {
overflow:hidden;
border:1px;
border:#7CAFBE solid 1px;
height:50%;
width:79%;
float:right;
padding:0 0 0 10px;
padding-left:1px;
z-index:1000;
}
csoft
Comment