summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
authorDenis Demesmaeker2008-05-19 13:11:21 +0000
committerDenis Demesmaeker2008-05-19 13:11:21 +0000
commitb9a85c43ef088697b17bb939005099704b9400f5 (patch)
treeaef25ea146359cd19e1ef68f5ccab23b67d34f3d /itjs
parent70c3cf5bffed02792f15100ff775fec1e23a0c2d (diff)
downloaditools-b9a85c43ef088697b17bb939005099704b9400f5.tar.gz
itools-b9a85c43ef088697b17bb939005099704b9400f5.tar.bz2
itools-b9a85c43ef088697b17bb939005099704b9400f5.zip
handle urls without querystring correctly
Diffstat (limited to 'itjs')
-rw-r--r--itjs/loader.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/itjs/loader.js b/itjs/loader.js
index 25bb33c..99b918d 100644
--- a/itjs/loader.js
+++ b/itjs/loader.js
@@ -70,7 +70,7 @@ load: function(baseurl, pos, num, query_volatile, retry)
var use_script = (window.console && window.console.firebug) || !samehost; // use XMLHTTP request only if on same host and not using firebug
if (retry)
- baseurl += "&retry=" + retry;
+ baseurl += (baseurl.match(/\?/) ? "&" : "?") + "retry=" + retry;
if (!use_script)
{
@@ -95,7 +95,7 @@ load: function(baseurl, pos, num, query_volatile, retry)
try
{
- this.req.open(this.method, baseurl + "&pos=" + pos + "&num=" + num + (query_volatile ? query_volatile : ""));
+ this.req.open(this.method, baseurl + (baseurl.match(/\?/) ? "&" : "?") + "pos=" + pos + "&num=" + num + (query_volatile ? query_volatile : ""));
var me = this;
this.req.onreadystatechange = function() { me.readyStateChanged(); }
var workingxmlhttp = this.req.onreadystatechange;
@@ -118,7 +118,7 @@ load: function(baseurl, pos, num, query_volatile, retry)
}
else
{
- var req_url = baseurl + "&pos=" + pos + "&num=" + num + (query_volatile ? query_volatile : "") + (this.post_data ? '&' + this.post_data : "") + "&itjs_call=it_loader.__inst" + this.instance + "&itjs_callid=" + ++this.callid;
+ var req_url = baseurl + (baseurl.match(/\?/) ? "&" : "?") + "pos=" + pos + "&num=" + num + (query_volatile ? query_volatile : "") + (this.post_data ? '&' + this.post_data : "") + "&itjs_call=it_loader.__inst" + this.instance + "&itjs_callid=" + ++this.callid;
if (!use_script || (window.opera && !window.XMLHttpRequest)) // Opera 7 only works with iframes
{