rem: if (urlstring){ this.URLString = urlstring; } if (this.element) { this.elementObj = document.getElementById(this.element); } if (this.xmlhttp) { var self = this; this.xmlhttp.open(this.method, this.requestFile ,true); if (this.method == "POST") { this.xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded') } if (this.encodeURIString){ this.URLString = this.encodeURLString(this.URLString); } this.xmlhttp.send(this.URLString); this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState){ case 1: self.onLoading(); break; case 2: self.onLoaded(); break; case 3: self.onInteractive(); break; case 4: self.response = self.xmlhttp.responseText self.responseXML = self.xmlhttp.responseXML; self.onCompletion(); if(self.execute){ self.runResponse(); } if (self.elementObj) { self.elementObj.innerHTML = self.response; } break; } }; } }; 
add: if (urlstring){ this.URLString = urlstring; } if (this.element) { this.elementObj = document.getElementById(this.element); } if (this.xmlhttp) { var self = this;  try { if(!this.xmlhttp.setRequestHeader){ this.method = "GET"; } } catch (ex) { }  if (this.encodeURIString){ this.URLString = this.encodeURLString(this.URLString); }  if (this.method == "POST") { this.xmlhttp.open(this.method, this.requestFile ,true); this.xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); this.xmlhttp.send(this.URLString); }else{ this.xmlhttp.open(this.method, this.requestFile+'?'+this.URLString, true); this.xmlhttp.send(); }  this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState){ case 1: self.onLoading(); break; case 2: self.onLoaded(); break; case 3: self.onInteractive(); break; case 4: self.response = self.xmlhttp.responseText; self.responseXML = self.xmlhttp.responseXML; self.onCompletion(); if(self.execute){ self.runResponse(); } if (self.elementObj) { self.elementObj.innerHTML = self.response; } break; } }; } }; 
context: 	this.runAJAX = function(urlstring){		if (urlstring){ this.URLString = urlstring; }		if (this.element) { this.elementObj = document.getElementById(this.element); }		if (this.xmlhttp) {			var self = this; // wierd fix for odd behavior where "this" wouldn't work in the readystate function.			this.xmlhttp.open(this.method, this.requestFile ,true);			if (this.method == "POST") { this.xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded') }			if (this.encodeURIString){ this.URLString = this.encodeURLString(this.URLString); }			this.xmlhttp.send(this.URLString);			this.xmlhttp.onreadystatechange = function() {				switch (self.xmlhttp.readyState){					case 1: // Loading.						self.onLoading();					break;					case 2: // Loaded.						self.onLoaded();					break;					case 3: // Interactive - is called every 4096 bytes.. pretty much just tells you it's downloading data.						self.onInteractive();					break;					case 4: // Completed.						self.response = self.xmlhttp.responseText            self.responseXML = self.xmlhttp.responseXML;						self.onCompletion();						if(self.execute){ self.runResponse(); }						if (self.elementObj) { 							self.elementObj.innerHTML = self.response;						}					break;				}			};		}	};
meta: 4895	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4895/8cbcbff7d52f21e65c1a52b07ff5767f70e49f54/tw-sack.js/clean/tw-sack.js