-
16 Apr 2008 8:00 PM #41
-
16 Apr 2008 11:10 PM #42
Hi hendricd,
First of all, thanks for this very useful plugin. It's being put to good use.
Personally, I needed a way for the MIFPanel to evaluate scripts when the iframe's content was set using the "html" property. I needed to make a small hack on a line of your code:
from the "MIFPanel::afterRender" method:PHP Code:this.iframe.update(typeof html == 'object' ? Ext.DomHelper.markup(html) : html, this.scripts);
I omitted the "callback" parameter because it's of no use when setting the html directly. Also, I was too lazy to properly declare the "scripts" config parameter, seeing as it can be monkeypatched in without harm.PHP Code:afterRender : function(container){
var html = this.html;
delete this.html;
Ext.ux.ManagedIframePanel.superclass.afterRender.call(this);
if(this.iframe){
if(this.defaultSrc){
this.setSrc();
}
else if(html){
this.iframe.update(typeof html == 'object' ? Ext.DomHelper.markup(html) : html, this.scripts);
}
}
}
I'm not sure this is of general use, but I'm posting it here just in case.
Thanks again,
Simon
-
17 Apr 2008 12:24 PM #43
@simonbun - Thanks.
Yes, MIF/P was designed to mimick the API and Updater rules of a standard Ext.Panel, which raises the point:
There is currently no away (for an individual lazy-loaded Panel) to enable scripting on :html content @config-time (unless you set the global class default for Ext.Updater.loadScripts = true) Then, MIF would honor it in the that scenario.
I'll see if I can come up with something 'intuitive' for the next release."be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
18 Apr 2008 8:58 AM #44
-
18 Apr 2008 9:09 AM #45
@colinexl --if you mean:
I would need to see your panel configs, but you mave have assigned 'false' somewhere as the srcURL for the frame?However, I still have a problem with the loadMask in IE7. In FF it works fine, but in IE I get a "false" text instead of a load mask.
Check it out.."be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
18 Apr 2008 1:15 PM #46
@hendricd
Here's the code that I have:
the url parameter is: "channelAdd?channelNumber=5&filter="PHP Code:createSetupChannelWindow = function(url, channelNumberToHighlight)
{
createCookie('channelNumberToHighlight', channelNumberToHighlight, 7); // set cookie to select row after page refresh
dialog = new Ext.Window(
{
title: 'Channel Form',
autoScroll: true,
modal: true,
closable: false,
maximizable: false,
layout: 'fit',
resizable: false,
listeners:
{
close: function()
{
setTimeout('window.location.reload()', 500);
}
},
items:
{
layout: 'card',
xtype: 'panel',
activeItem : 0,
id: 'iFrameContainer',
defaultType: 'iframecontent',
items:
[{
xtype: 'iframepanel',
id: 'iFrameContent',
loadMask: true,
layout: 'fit',
defaultSrc: url
}]
}
});
dialog.show();
dialog.setSize(700, 400);
dialog.center();
Ext.getCmp('iFrameContent').setSrc(url);
}
I've looked at all the include files to see if there's "false" anywhere but I cannot find anything.
-
18 Apr 2008 1:33 PM #47
No need to do this again, remove it.
What version MIF are you using?Code:Ext.getCmp('iFrameContent').setSrc(url);"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
18 Apr 2008 2:15 PM #48
Hi Hendricd,
I am using Version: 1.1 of MIF.
I removed the line and the "false" is still there.
I downloaded a tool to inspect IE's DOM and I found something interesting.
I copied the <HTML> innerHTML from the DOM in IE when the "false" was being displayed.
<HEAD>
<SCRIPT type=text/javascript>(function(){(window.hostMIF = parent.Ext.get("ext-gen46"))._windowContext=window;})();</SCRIPT>
</HEAD>
<BODY>false</BODY>
The body has false in it and I don't know why. I tried giving a different URL "http://www.google.com" and I'm still getting the same problem.
What would cause the <body> tag in the iframe to become false?
-
18 Apr 2008 2:50 PM #49
Odd, I can't duplicate it here. Do you have live URL for snooping this?
"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
18 Apr 2008 3:00 PM #50
hi Hendricd,
Thanks for the help. I solved this problem by not using MIF =(
If I just use the HTML attribute and define an "iframe" in there, it works without displaying the "false".
I'm not sure why this happens but for now, I'm not using the MIF extension.
I guess I'll have to live without the loadmask.
Thanks,
Colin




Reply With Quote

