Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/gui
In directory usw-pr-cvs1:/tmp/cvs-serv6592
Modified Files:
loadpanel.js
Log Message:
Put back the IE5 PC behaviour method of loading, and kept the IFRAME method for Mac IE.
Index: loadpanel.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/loadpanel.js,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** loadpanel.js 2001/03/25 06:04:16 1.12
--- loadpanel.js 2001/03/28 15:31:21 1.13
***************
*** 14,18 ****
this.autoW=false;
this.isILayer=false;
! this.isIFrame=true;
var l=new EventListener(this);
l.onresize=function(e) {
--- 14,18 ----
this.autoW=false;
this.isILayer=false;
! (is.ie5 && is.platform=='win32')?this.isIFrame=false:this.isIFrame=true;
var l=new EventListener(this);
l.onresize=function(e) {
***************
*** 53,59 ****
};
LoadPanel.prototype.insertInlineElements=function() {
! if (is.ns4 && this.isILayer) this.setHTML('<ilayer></ilayer>',false);
else if (is.ns6) this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden;"></IFRAME>',false);
- else if (is.ie5) this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden; display: none;"></IFRAME>',false);
else if (is.ie4) {
if (this.useBuffer) this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden; display: none;"
onLoad="LoadQueue.loadHandler()"></IFRAME>',false);
--- 53,62 ----
};
LoadPanel.prototype.insertInlineElements=function() {
! if (is.ie5) {
! if (this.isIFrame) this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden; display: none;"></IFRAME>',false);
! else this.setHTML('<DIV ID="'+this.id+'loadElement"
STYLE="behavior:url(#default#download)" style="display: none;"></DIV>',false);
! }
! else if (is.ns4 && this.isILayer) this.setHTML('<ilayer></ilayer>',false);
else if (is.ns6) this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden;"></IFRAME>',false);
else if (is.ie4) {
if (this.useBuffer) this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden; display: none;"
onLoad="LoadQueue.loadHandler()"></IFRAME>',false);
***************
*** 62,71 ****
};
LoadPanel.prototype.findInlineElements=function() {
! if (is.ns4) {
if (this.isILayer) this.loadElement=this.doc.layers[0];
else this.loadElement=this.elm;
}
else if (is.ns6)
this.loadElement=document.getElementById(this.id+'loadElement');
- else if (is.ie5) this.loadElement=document.frames(this.id+'loadElement');
else if (is.ie4) {
if (this.isIFrame)
this.loadElement=document.all[this.id+'loadElement'];
--- 65,77 ----
};
LoadPanel.prototype.findInlineElements=function() {
! if (is.ie5) {
! if (this.isIFrame)
this.loadElement=document.frames(this.id+'loadElement');
! else this.loadElement=document.all(this.id+'loadElement');
! }
! else if (is.ns4) {
if (this.isILayer) this.loadElement=this.doc.layers[0];
else this.loadElement=this.elm;
}
else if (is.ns6)
this.loadElement=document.getElementById(this.id+'loadElement');
else if (is.ie4) {
if (this.isIFrame)
this.loadElement=document.all[this.id+'loadElement'];
***************
*** 109,112 ****
--- 115,124 ----
LoadPanel.prototype.loadHandler=function(url) {
this.url=url;
+ if (is.ie5 && !this.isIFrame && this.elm && this.elm.all) {
+ var imgs = this.elm.all.tags("img");
+ for (var i=0;i<imgs.length;i++) {
+ if (imgs[i].readyState == 'uninitialized') imgs[i].src =
+imgs[i].src;
+ }
+ }
if (is.ns4 && this.isILayer) {
var w=this.loadElement.document.width;
***************
*** 154,160 ****
}
if (is.ie5) {
! lpanel.loadElement.document.isLoading=true;
! lpanel.loadElement.location=url;
! lpanel.timerID=setInterval(this.toString() +
'.loadTimer()',250);
}
else if (is.ie4) {
--- 166,175 ----
}
if (is.ie5) {
! if (lpanel.isIFrame) {
! lpanel.loadElement.document.isLoading=true;
! lpanel.loadElement.location=url;
! lpanel.timerID=setInterval(this.toString() +
'.loadTimer()',250);
! }
! else
lpanel.loadElement.startDownload(url,LoadQueue.loadHandler);
}
else if (is.ie4) {
***************
*** 179,183 ****
else if (lpanel.loadElement.contentDocument &&
lpanel.loadElement.contentDocument.body.innerHTML != document.body.innerHTML) {
clearInterval(lpanel.timerID);
!
LoadQueue.loadHandler(lpanel.loadElement.contentDocument.body.innerHTML);
}
}
--- 194,198 ----
else if (lpanel.loadElement.contentDocument &&
lpanel.loadElement.contentDocument.body.innerHTML != document.body.innerHTML) {
clearInterval(lpanel.timerID);
! LoadQueue.loadHandler(lpanel.loadElement.contentDocument);
}
}
***************
*** 189,193 ****
LoadQueue.continueLoad();
}
! else if (!lpanel.loadElement.document.isLoading &&
lpanel.loadElement.document.readyState=='complete') {
clearInterval(lpanel.timerID);
LoadQueue.loadHandler(lpanel.loadElement.document.body.innerHTML);
--- 204,208 ----
LoadQueue.continueLoad();
}
! else if (!lpanel.loadElement.document.isLoading &&
(lpanel.loadElement.document.readyState=='interactive' ||
lpanel.loadElement.document.readyState=='complete')) {
clearInterval(lpanel.timerID);
LoadQueue.loadHandler(lpanel.loadElement.document.body.innerHTML);
***************
*** 201,205 ****
if (is.ie) {
lp.elm.innerHTML=e;
! lp.loadElement=null;
}
else if (is.ns4) {
--- 216,220 ----
if (is.ie) {
lp.elm.innerHTML=e;
! if (lp.isIFrame) lp.loadElement=null;
}
else if (is.ns4) {
***************
*** 210,214 ****
}
else if (is.ns6) {
! lp.elm.innerHTML=e;
lp.loadElement=null;
}
--- 225,230 ----
}
else if (is.ns6) {
! var html=e.body.innerHTML;
! lp.elm.innerHTML=html;
lp.loadElement=null;
}
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs