** AJAX HELPER CLASS ***********************************************************
********************************************************************************
*/
-var pzHttpRequest = function (url, errorHandler, cookieDomain) {
+var pzHttpRequest = function (url, errorHandler, cookieDomain, windowId) {
this.maxUrlLength = 2048;
this.request = null;
this.url = url;
this.isXDR = false;
this.domainRegex = /https?:\/\/([^:/]+).*/;
this.cookieDomain = cookieDomain || null;
+ this.windowId = windowId || window.name;
var xhr = new XMLHttpRequest();
var domain = this._getDomainFromUrl(url);
//session cookie, resend it
var domain = this._getDomainFromUrl(url);
if (domain && this._isCrossDomain(domain) &&
- this.getCookie(domain+":SESSID")) {
+ this.getCookie(domain+":"+this.windowId+":SESSID")) {
//rewrite the URL
- var sessparam = ';jsessionid=' + this.getCookie(domain+":SESSID");
+ var sessparam = ';jsessionid=' + this.getCookie(domain+":"+this.windowId+":SESSID");
var q = url.indexOf('?');
if (q == -1) {
url += sessparam;
var jsessionId = this.request.responseXML
.documentElement.getAttribute('jsessionId');
if (jsessionId)
- this.setCookie(domain+":SESSID", jsessionId);
+ this.setCookie(domain+":"+this.windowId+":SESSID", jsessionId);
}
this.callback(this.request.responseXML);
} else {