var s = "javascript:document.getElementById('" + iid + "').style.visibility='visible'"; LzBrowser.loadJS(s); var s = "javascript:document.getElementById('" + iid + "').style.visibility='hidden'"; //Debug.write("on hide l'iframe",iid," :",s); LzBrowser.loadJS(s); if (!this.isinited || this.isrc== null) { //catch the case where this.time is being this.isrc = s; //initialized during object instantiation return; } var s = "javascript:document.getElementById('" + iid + "').src='" + s + "'"; LzBrowser.loadJS(s); // First initialize the iFrame loading detection mechanism : //initCreateIFrameDone(); // Now creating the iframeView : //createIFrame(); //Debug.write("create IFRAME !!!!!!!!!!!!!!"); var s = "javascript:createIFrame('" + iname + "','" + iid + "','" + isrc + "','" + this.getAttributeRelative("x",canvas) + "','" + this.getAttributeRelative("y",canvas) + "','" + (width +1) + "','" + (height+1) + "')"; // the browser must also tell our laszlo when the iframeView has been loaded : s = s + ";document.getElementById('" + iid + "').style.visibility='visible'"; s = s + ";lzSetCanvasAttribute('" + createIFrameDone_attr + "', true)"; ////Debug.write("Calling createIFrame ; loadJS : " + s);// LzBrowser.loadJS(s); // initializing the scheduled check of this iFrame's load state if(typeof this.createIFrame_callbackDelegate == 'undefined') { this.createIFrame_callbackDelegate = new LzDelegate( this, "createIFrame_callback" ); } LzTimer.resetTimer( this.createIFrame_callbackDelegate, callbackTimerDelay ); // Initializes the iFrame loading detection mechanism. // computing and setting the name of this iframeView's own // load state attribute on the canvas : this.createIFrameDone_attr = 'iFrame.createIFrameDone_' + this.iid; // initializing this iframeView's own load state on the canvas : canvas.setAttribute(createIFrameDone_attr, false); ////Debug.write('createIFrameDone_attr='+this.createIFrameDone_attr);// ////Debug.write('createIFrameDone='+this.createIFrameDone+canvas.getAttribute(createIFrameDone_attr));// ////Debug.write("createIFrame_callback : createIFrame_done=" + canvas.getAttribute(createIFrameDone_attr));// if(!canvas.getAttribute(createIFrameDone_attr)) { if (this.createIFrame_callbackCounter * callbackTimerDelay < createIFrame_callbackMax) { this.createIFrame_callbackCounter = this.createIFrame_callbackCounter + 1; LzTimer.resetTimer( this.createIFrame_callbackDelegate, callbackTimerDelay ); } } else { // creating iframeView moves listeners : //Debug.write('createListeners');// createListeners(); // now let's make sure the iframeView has been toggled by moving it if (this.iFrameJsStack == 'javascript:') { ////Debug.write('createListeners.move');// // there's no javascript stack yet, so let's simply move the iframeView : centerIframe(); } else { ////Debug.write('createListeners.stacked '+this.iFrameJsStack);// // some javascript has been scheduled to be loaded, so let's do it : LzBrowser.loadJS(this.iFrameJsStack); } } ////Debug.write("executeJs", s);// if (canvas.getAttribute(createIFrameDone_attr)) { ////Debug.write("executeJs.direct", s);// LzBrowser.loadJS(s); // iframeView is loaded, so direct execution } else { ////Debug.write("executeJs.stacked", s);// // else the iframeView has not yet been loaded, so let's stack it : this.iFrameJsStack = this.iFrameJsStack + ';' + s ; } this.myDelx = new LzDelegate(this, "centerIframe", this, "onx"); this.myDely = new LzDelegate(this, "centerIframe", this, "ony"); this.myDelw = new LzDelegate(this, "centerIframe", this, "onwidth"); this.myDelh = new LzDelegate(this, "centerIframe", this, "onheight"); // we use a timer in order to avoid too many js call (slow) //Debug.write("centerIframe request"); if(typeof this.centerIframe_Delegate == 'undefined') { this.centerIframe_Delegate = new LzDelegate( this, "centerIframe_jsCall" ); } LzTimer.resetTimer( this.centerIframe_Delegate, 20 ); var s = "javascript:centerIframe('" + this.iid + "','" + this.getAttributeRelative("x",canvas) + "','" + this.getAttributeRelative("y",canvas) + "','" + (width +1) + "','" + (height+1) + "')"; this.executeJs(s); // using the stackable js exec mechanism