Jump to content

Where is my XML???


Gayner

Recommended Posts

function njAJAX() {
this.callback = 0;
this.waitingResponse = 0;
this.url = "";
this.method = "GET";
this.params = null;
this.errorCallback = 0;
this.xmlObj = 0;

this.getPage = function(pageURL, pageCallback) {
	if(this.waitingResponse) return;
	if(pageURL) this.url = pageURL;
	if(pageCallback) this.callback = pageCallback;

	try {
		this.xmlObj = new XMLHttpRequest();
	} catch (error) {
		try {
			this.xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (error) {
		}
	}
	if(!this.xmlObj) return;
	var o = this;
	this.xmlObj.onreadystatechange = function() {
		if(o.xmlObj && o.xmlObj.readyState == 4 && o.xmlObj.status == 200) {
			if(!o.xmlObj.responseXML && o.errorCallback) o.errorCallback();
			o.waitingResponse = 0;

			if(o.callback) o.callback(o);
		}
	}
	this.xmlObj.open(this.method, this.url, true);
	this.xmlObj.send(this.params);
	this.waitingResponse = 1;
}

this.getElementNodeValue = function(eName, eIndex) {
	var e = this.xmlObj.responseXML.getElementsByTagName(eName);
	if(!eIndex) eIndex = 0;
	if(e && e[eIndex] && e[eIndex].childNodes && e[eIndex].childNodes[0]) return e[eIndex].childNodes[0].nodeValue;
}
}

 

WERE CAN I FIND what name is loading for my .xML ?

Link to comment
https://forums.phpfreaks.com/topic/174042-where-is-my-xml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.