469,270 Members | 1,733 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

internet explorer send error report

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
1 4722
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.

Similar topics

4 posts views Thread by Nicolás Castagnet | last post: by
2 posts views Thread by CathieC | last post: by
1 post views Thread by =?Utf-8?B?UGF5cm9sbCBmcnVzdHJhdGVk?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.