summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--itjs/loader.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/itjs/loader.js b/itjs/loader.js
index 3735bca..2089679 100644
--- a/itjs/loader.js
+++ b/itjs/loader.js
@@ -66,12 +66,13 @@ load: function(baseurl, pos, num, query_volatile, retry)
if (num > 0)
{
this.loader = null;
+ var samehost = (baseurl.indexOf('http://') < 0 || baseurl.indexOf(window.location.hostname) > 0);
if (retry)
baseurl += "&retry=" + retry;
// use XMLHTTP request if available
- if (baseurl.indexOf('http://') < 0 || baseurl.indexOf(window.location.hostname) > 0)
+ if (samehost)
{
try
{
@@ -118,7 +119,7 @@ load: function(baseurl, pos, num, query_volatile, retry)
{
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;
- if (window.opera && !window.XMLHttpRequest) // Opera 7 only works with iframes
+ if (samehost || (window.opera && !window.XMLHttpRequest)) // Opera 7 only works with iframes
{
this.scrpt = document.createElement("iframe");
this.scrpt.style.width = this.scrpt.style.height = 1;