Connecting Tech Pros Worldwide Help | Site Map

system error -1072896748

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 7th, 2006, 02:52 AM
Newbie
 
Join Date: Aug 2006
Posts: 1
Default system error -1072896748

Hi,

I am new to AJAX. This is my first project with AJAX and I am getting error "system error -1072896748" when I try to get the xmlhttp.responsetext

my html page:

<body onLoad="sendReq(url, stateChanged);">
<div id="txtOut">This will be replaced by xmlhttp.responsetext </div>

my .js:

var xmlHttp = createRequestObject();

function sendReq(url, handlerFunction) {
xmlHttp.onreadystatechange = handlerFunction;
xmlHttp.open('get', url, true);
xmlHttp.send(null);
}


function stateChanged() {
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
document.getElementById("txtOut").innerHTML = xmlHttp.responseText ;
}
}


the url in the xmlHttp.open is a call to a jsp page which is calling a method ProcessRequest in java to process the request.

The method in java to process the request is using the ServletOutputStream, something like this:

ServletOutputStream outputStream = response.getOutputStream();
lBytesRead = inputStream.read(bBuffer);
outputStream.write(bBuffer, 0, lBytesRead);
outputStream.flush();
outputStream.close();

PLEASE HELP

thanks,
Thuy
Reply
  #2  
Old September 1st, 2006, 07:57 AM
Newbie
 
Join Date: Sep 2006
Posts: 1
Default

Hi,

I had the same problem. Got it working by replacing the following line in "CreateRequestObject"

xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
replaced by
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP.5.0");

(Off course to be compatible with other IE versions you should make it a bit more general. E.g. http://www.multidesk.be/artikels/artikel/160/ section 4.1. Comment are in Dutch, but it should be easy to understand)

bye,
Tijskex
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.