From: b0n3z <b0...@go...> - 2000-12-02 18:58:26
|
I have been trying to find or port over the loadhtml.js for the latest release of dynapi-2000.11.05.zip , 06, or 07. I desperatly need one - please. Thanks, Ken Here was the older one that I have from somewhere: ----------------------------------------------------- /* Core DynAPI Distribution loadURL extension */ if (is.ie5) document.write('<DIV ID="downLoadContent" STYLE="behavior:url(#default#download)" style="display: none;"></DIV>'); else if (is.ie) document.write('<IFRAME ID="downLoadContent" STYLE="visibility: hidden; display: none;" onLoad="alert(\'complete\');if (DynAPI.setURL.current) DynAPI.setURL.current.onLoad(this)"></IFRAME>'); // Set ourselves up to start loading layers after the document loads. lqLoadEvent=new EventListener(); lqLoadEvent.onafterload=function(){ DynAPI.setURL() } DynAPI.document.addEventListener(lqLoadEvent) DynLayer.prototype.onLoad=function(e) { var lyr if (is.ie) lyr=document.all[DynLayer.prototype.setURL.current].lyrobj lyr.elm.innerHTML=e } else if (is.dom) { // alert(loaded); lyr=DynLayer.setURL.current DOMShortcuts.setInnerHTML(lyr.elm,DOMShortcuts.getInnerHTML(e)) } else if (is.ns4) lyr=DynLayer.prototype.setURL.current lyr.elm.onload=function(){} this.onload=function(){} } lyr.invokeEvent('load'); // invoke the event for others to catch. DynLayer.prototype.setURL.current=null; if (DynLayer.prototype.setURL.loadList.length>0) lyr.setURL() return true } DynLayer.prototype.setURL=function(url) var cLyr=this if (!url) if (DynAPI.setURL.loadList.length<=0) return var l=DynAPI.setURL.loadList url=l[l.length-1] l.length-- cLyr=l[l.length-1] l.length-- } if ((is.ns4 && !DynAPI.loaded) || DynAPI.setURL.current!=null) var l=DynAPI.setURL.loadList l[l.length]=cLyr l[l.length]=url if ((is.ns && !DynAPI.loaded) || DynAPI.setURL.current!=null) return else l.length-=2 } DynAPI.setURL.current=cLyr.elm.id cLyr.invokeEvent('beforeload') // invoke beforeload event for others to catch. if (is.ns4) DynAPI.setURL.current=cLyr if (cLyr.elm.parentLayer!=window) var l=cLyr.elm while (l.parentLayer!=window) l=l.parentLayer l.onload=cLyr.onLoad } cLyr.elm.onload=cLyr.onLoad cLyr.elm.src=url } else if (is.ie5) document.all.downLoadContent.startDownload(url,this.onLoad) else if (is.ie) { // Bug fix on IE4, IFRAME doesn't issue onLoad event. cLyr.timerID=setInterval("if (document.all.downLoadContent.readyState=='complete') {clearInterval("+cLyr.toString()+".timerID);"+cLyr.toString()+".onLoad(docum ent.frames['downLoadContent'].document.innerHTML)}",250); document.all.downLoadContent.src=url } else if (is.dom) { var e=document.getElementById('downLoadContent') if (!e) { e=document.createElement('DIV') e.setAttribute('id','downloadContent') document.body.addChild(e) } e.setAttribute("style","content: "+url) e.onload=this.onLoad DynAPI.setURL.current=cLyr // cLyr.timerID=setInterval("if (document.all.downLoadContent.readyState=='complete') {clearInterval("+cLyr.toString()+".timerID);"+cLyr.toString()+".onLoad(docum ent.frames['downLoadContent'].document.innerHTML)}",250); e.src=url } this.url=url } DynAPI.setURL=DynLayer.prototype.setURL DynAPI.setURL.loadList=[]; DynAPI.setURL.current=null; |