summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2007-09-12 09:16:46 +0000
committerThomas BrĂ¼derli2007-09-12 09:16:46 +0000
commitd0b77364f69784ca75085710d6f019007ca1b992 (patch)
treec8a1f0a748e22810567fa2a68d4dd1204a0a244a
parenta0e2647d1228254f2282b054d1f86fae4f350fc8 (diff)
downloaditools-d0b77364f69784ca75085710d6f019007ca1b992.tar.gz
itools-d0b77364f69784ca75085710d6f019007ca1b992.tar.bz2
itools-d0b77364f69784ca75085710d6f019007ca1b992.zip
Use iframes if possible (to prevent IE6 crashes)
-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;