diff options
author | Thomas BrĂ¼derli | 2007-09-12 09:16:46 +0000 |
---|---|---|
committer | Thomas BrĂ¼derli | 2007-09-12 09:16:46 +0000 |
commit | d0b77364f69784ca75085710d6f019007ca1b992 (patch) | |
tree | c8a1f0a748e22810567fa2a68d4dd1204a0a244a | |
parent | a0e2647d1228254f2282b054d1f86fae4f350fc8 (diff) | |
download | itools-d0b77364f69784ca75085710d6f019007ca1b992.tar.gz itools-d0b77364f69784ca75085710d6f019007ca1b992.tar.bz2 itools-d0b77364f69784ca75085710d6f019007ca1b992.zip |
Use iframes if possible (to prevent IE6 crashes)
-rw-r--r-- | itjs/loader.js | 5 |
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; |