From: Samuel, M. M <Sam...@ed...> - 2000-11-13 03:46:10
|
Afternoon all! I've been trying to work my way through the Loadpanel.js file... I'm trying to see if I can help out with some of the issues and maybe even throw in some code myself. Be warned however - that I do not understand all about the API as yet, so bear with me please! I'm using the 11-09 release of the loadpanel.js file - which I noticed had just the one change (taking the eval statement off a line). I cannot get the example to work under NS 4.04 - but I'm guessing that's not such a bad thing now... It works under NS 4.08. However - I've noticed that when clicking the file links under IE5.5 the actual layer doesn't change size. Under NS4.08 - the layer resizes it's height to accomodate the extra content. Should this be the case? It relates to the line in the code: this.autoH=true this.autoW=false this.isILayer=false this.isIFrame=true When I set autoH to false - it behaves exactly as IE5.5 does. Is there actually a way to set this from the html page rather than having it specified in the JS file? Further down is this code segment: LoadPanel.prototype.insertInlineElements = function() { if (is.ns4 && this.isILayer) { this.setHTML('<ilayer></ilayer>') } else { if (is.ie5) this.setHTML('<DIV ID="'+this.id+'loadElement" STYLE="behavior:url(#default#download)" style="display: none;"></DIV>'); if (is.ie4) { if (this.useBuffer) { this.setHTML('<IFRAME ID="'+this.id+'loadElement" STYLE="visibility: hidden; display: none;" onLoad="LoadQueue.loadHandler()"></IFRAME>'); } else { // size iframe to the layer } } } } Specifically - the this.useBuffer statement... where does it get the useBuffer property from? Is that a property of the iframe? Okay - I'm writing this as I'm playing - so forgive my jumping around... :) I've managed to get the loadpanel.js working under IE 4.01 now. It relates to the if (this.useBuffer) statement. Without knowing what it's derived from, I can't determine it's value. However, IE4.01 kept on bombing out any time there was an attempt to get any attributes (or set any) for the IFrame... It relates to the this.useBuffer not being true. Full code from LoadPanel.prototype.insertInlineElements ** Notice missing code under the if (is.ie4) function LoadPanel.prototype.insertInlineElements = function() { if (is.ns4 && this.isILayer) { this.setHTML('<ilayer></ilayer>') } else { if (is.ie5) this.setHTML('<DIV ID="'+this.id+'loadElement" STYLE="behavior:url(#default#download)" style="display: none;"></DIV>'); if (is.ie4) { this.setHTML('<IFRAME ID="'+this.id+'loadElement" STYLE="visibility: hidden; display: none;" onLoad="LoadQueue.loadHandler()"></IFRAME>'); } } } Full code from LoadQueue.prototype.loadNext LoadQueue.prototype.loadNext = function() { if (!this.busy && this.queue[this.index]) { this.busy = true var lpanel = this.currentLoadPanel = this.queue[this.index][1] var url = this.currentURL = this.queue[this.index][0] if (is.ns4) { DynAPI.document.releaseMouseEvents() var lyr=lpanel.elm while(lyr.parentLayer!=window) lyr=lyr.parentLayer lyr.onload=LoadQueue.loadHandler lpanel.loadElement.onload=LoadQueue.loadHandler lpanel.loadElement.src=url } else if (is.ie5) { lpanel.loadElement.startDownload(url,LoadQueue.loadHandler) } else if (is.ie4) { // HAS NOT BEEN TESTED if (lpanel.elm.innerHTML.indexOf("<IFRAME") == -1) { lpanel.insertInlineElements() } lpanel.timerID=setInterval("if (document.frames['"+lpanel.id+"loadElement'].document.readyState=='interactive') {clearInterval("+lpanel.toString()+".timerID);LoadQueue.loadHandler(document.fra mes['"+lpanel.id+"loadElement'].document.body.innerHTML)}",250) document.frames[lpanel.id+"loadElement"].document.location=url } this.index++ } } Hope this helps further development Mike |