hi,
i wrote the following coding..........
[HTML] <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Getting Server side data using AJAX</title>
</head>
<script>
function creat_Object()
{
var xmlhttp;
// This if condition for Firefox and Opera Browsers
if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
{
try
{
xmlhttp = new XMLHttpRequest();
}
catch (e)
{
alert("Your browser is not supporting XMLHTTPRequest");
xmlhttp = false;
}
}
// else condition for ie
else
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlhttp;
}
var request = creat_Object();
function sever_interaction()
{
if(request.readyState == 1)
{
document.getElementById('aja_cnts').innerHTML='';
document.getElementById('aja_cnts').innerHTML = 'Loading...';
}
if(request.readyState == 4)
{
var answer = request.responseText;
document.getElementById('aja_cnts').innerHTML='';
document.getElementById('aja_cnts').innerHTML = answer;
}
}
function page1()
{
request.open("GET", "page1.html");
request.onreadystatechange = sever_interaction;
request.send('');
}
function page2()
{
request.open("GET", "page2.asp");
request.onreadystatechange = sever_interaction;
request.send('');
}
function page3()
{
request.open("GET", "page3.htm");
request.onreadystatechange = sever_interaction;
request.send('');
}
</script>
<body>
<table width="80%" border="0" cellspacing="2">
<caption>
Using AJAX
</caption>
<tr>
<td width="39%" valign="top"><label>
<input type="button" name="Button" value="page1" onclick="page1();" /><br>
<input type="button" name="Button1" value="page2" onclick="page2();" /><br>
<input type="button" name="button2" value="page3" onclick="page3();"/>
</label></td>
<td width="61%"><div id="aja_cnts"> </div></td>
</tr>
</table>
</body>
</html>
[/HTML]
this coding is working in firefox........but while i run this coding in internet explorer,it displays following error pop up window......
microsoft internet explorer has encountered a problem and needs to close.
.....please see and tell how can i rectify this problem.........
regards,
mubarak.