By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,738 Members | 1,682 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,738 IT Pros & Developers. It's quick & easy.

internet explorer send error report

P: 10
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.
Aug 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: 1
Try changing this:
Expand|Select|Wrap|Line Numbers
  1. request.send('')
;
to
Expand|Select|Wrap|Line Numbers
  1. request.send(null)
;

I think that is where the problem is. Best wishes.
Sep 11 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.