Author: sontiaspnet | Posted on: 1/4/2010 9:16:02 PM | Views : 423

HI,
I have written code to access a text file in another server from my application in javascript. This code works fine in IE but fails in mozilla firefox. Below is the code i have written.
var httpRequest;
httpRequest = new XMLHttpRequest();
httpRequest.open('GET', url, true);
httpRequest.setRequestHeader('X-PINGOTHER','pingpong');
httpRequest.setRequestHeader('Content-Type','application/plain');
httpRequest.onreadystatechange = function() {alertContents(httpRequest);
httpRequest.send('');
function alertContents(httpRequest){
  if (httpRequest.readystate == 4){
       if (httpRequest.status == 200) {
          alert(httpRequest.responseText);
    }
}
}
 
Kindy help how to accomplish cross domain in moz ...

Go to the complete details ...