XMLHttp.prototype.get = function(url) {
  self.open("GET", url, true)
  self.onreadystatechange = function() {
     self.processRequest();}
  self.send(null);}

thanks for trying 2 help
yes i define it look up

:) :( :'(
look i include a js file having this function

XMLHttp = function() {
  self = this;
  if (typeof XMLHttpRequest != 'undefined')
  return new XMLHttpRequest();
  else if (window.ActiveXObject) {
    var avers = ["Microsoft.XmlHttp", "MSXML2.XmlHttp", "MSXML2.XmlHttp.3.0",  "MSXML2.XmlHttp.4.0", "MSXML2.XmlHttp.5.0"];
    for (var i = avers.length -1; i >= 0; i--) {
      try {httpObj = new ActiveXObject(avers[i]);
      return httpObj;
      } catch(e) {}
    }
  }
  throw new Error('XMLHttp (AJAX) not supported');
}

XMLHttp.prototype.get = function(url) {
  self.open('GET', url, true);
  self.onreadystatechange = function() {
     self.processRequest();}
  self.send(null);
}

XMLHttp.prototype.processRequest = function() {
  if (self.readyState == 4) {
    if (self.status != 200) {
      self.resp = 'Error : Status '+this.status+' returned.';
    } else {
      if (cType == 'text/xml') {
    self.resp = 'xml';
      } else if (cType == 'text/plain') {
    self.resp = 'text';
      } else {
    self.resp = 'unknown content type';
      }
      this.response();
    }
  }
}

ajaxObj = XMLHttp();
ajaxObj.get('myrequest.php');

ajaxObj2 = XMLHttp();
ajaxObj2.get('myrequest.php');

ajaxObj.response = function() {
  if (self.resp == 'xml') {
    alert(self.responseXML);
  } else if (self.resp == 'text') {
    alert(self.responseText);
  } else {
    alert(self.resp);
  }
}
ajaxObj2.response = function() {
  if (self.resp == 'xml') {
    alert(self.responseXML);
  } else if (self.resp == 'text') {
    alert(self.responseText);
  } else {
    alert(self.resp);
  }
}

[I]then i call it [/I]

if (!ajaxObj) {
ajaxObj = XMLHttp();
ajaxObj.get('myrequest.php');
} else {
ajaxObj2 = XMLHttp();
ajaxObj2.get('myrequest.php');
}
ajaxObj.response = function() {
if (this.resp == 'xml') {
alert(this.responseXML);
} else if (this.resp == 'text') {
alert(this.responseText);
} else {
alert(this.resp);
}
}
ajaxObj2.response = function() {
if (this.resp == 'xml') {
alert(this.responseXML);
} else if (this.resp == 'text') {
alert(this.responseText);
} else {
alert(this.resp);
}
}
This article has been dead for over six months. Start a new discussion instead.