Gayner Posted September 13, 2009 Share Posted September 13, 2009 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 ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.