-
3 Sep 2009 7:13 AM #111
Well, I've just tested my application without any MIF, and rendering still takes so much time... as you said the problem must come from Ext 3.0.0 version
and I don't have access to the SVN repository to get the latest builds 
Sorry hendricd for accusing your great extension
-
3 Sep 2009 7:52 AM #112
Hi all.
We have two ManagedIframe.
we would like to execute function1 inside iframe1 from frame2, and read/set variable1 from iframe2.
Is that possibile?
Both iframe are on the same domain.
From iframe2 we have:
and in iframe1 we have:Code:top.Ext.getCmp('contentPanel').mytest();
but function test is not called properly from iframe2.Code:function test() { alert("This is a test"); }
What can we do?
Thank you.
-
3 Sep 2009 9:27 AM #113
@alessandro--
First, fix this:
Then,Code:function test() { [ var | window.]test = function() { alert("This is a test"); }
the test() function is resolvable (anonymous functions are not!) in each frame's window context.Code:top.Ext.getCmp('contentMIFPanel').getFrameWindow().test();"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.
-
3 Sep 2009 9:54 AM #114
Thank you very much.
Now it works.
But I have another two questions:
1) what will change with or without "var" before the function declaration? I'm not a JS expert, but actually the function can be called even without the "var" before.
2) I have another similiar problem: a variabile named "myvar" is not visible from another iframe.
I've tried:
and then (from another iframe):Code:var myvar = 'test';
Should I even put that var in "window" context? If so, i'll have to rewrite much code that are currently using that variable.Code:alert(top.Ext.getCmp('contentPanel').getFrameWindow().myvar);
-
3 Sep 2009 3:57 PM #115
HI!
I am trying to implement functionality like in regular browser, i.e refresh, back and forward buttons..
Unfortunately setSrc() method sets back to first source assigned to that iframe, same withsetLocation()..
As seen from documentation there are no methods to directly call iframe history back and forward.
Any advice would be great!
Stju
-
4 Sep 2009 4:11 AM #116
Use the following code:
to refresh, try without any arguments, like this:Code:var MIF = top.Ext.getCmp('id_MIF'); MIF.submitAsTarget({ url: 'http://www.google.it', method: 'GET' });
Code:var MIF = top.Ext.getCmp('id_MIF').submitAsTarget();
-
4 Sep 2009 4:13 AM #117
I'm generating the following error but I'm unable to solve:
I have the following code:Code:missing ; before statement var window.countDomini = function(e) {\n
Code:<script> Ext.onReady(function(){ var window.countDomini = function(e) { statusZona = e.get('statusZona'); [ ... ] }; [ ... ] }); </script>
-
4 Sep 2009 4:57 AM #118
@Stju -- MIF does not provide such methods because they are already available via the the frame's window object (if it permits access to it from the parent page in the first place -- it may not !):
@alessandro --Code:myMIFPanel.getFrameWindow().back(); myMIFPanel.getFrameWindow().history.forward(); //either may be restricted

I was afraid you would mis-interpret my meaning with this:
var window.anything is invalid. window is the global object.Code:function test() { [ var | window.]test = function() { alert("This is a test"); } top.Ext.getCmp('contentMIFPanel').getFrameWindow().test();
Inside Ext.onReady or any other function, you must declare the "global namespace" of your function/variable as simply:
Use Firebug : Dom Tab and play with it until you understand it.Code:<script> // this == window here. var someOtherValue = 3500; Ext.onReady(function(){ window.countDomini = function(e) { statusZona = e.get('statusZona'); [ ... ] }; window.someOtherValue++; //now it's == 3501 }); </script>
"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.
-
4 Sep 2009 5:58 AM #119
Thank you.
Now it works.
Another question:
let's suppose that we have a function called "test".
Inside that function I have a global variable "imported" from outside function's scope, like "var myvar"
Code:var myvar = 'hello word'; window.test = function() { var myvar; alert(myvar); } Can I recall that function from another iframe, without loosing the scope for myvar? I would like to execute function inside frame1 from frame2 like as I'm running that function directly from frame1.
-
4 Sep 2009 7:43 AM #120
Hi,
I managed to run ManagedIFrame, but ocasionally I get this erro in FireFox:
Permission denied to call method Location.toString
Here is my index.html head includesPHP Code:Permission denied to call method Location.toString
anonymous()miframe-debug.js (line 502)
anonymous()miframe-debug.js (line 1067)
anonymous()miframe-debug.js (line 1767)
anonymous()miframe-debug.js (line 1846)
anonymous()miframe-debug.js (line 1719)
anonymous()miframe-debug.js (line 1946)
anonymous()miframe-debug.js (line 1922)
anonymous()
PHP Code:
<script type="text/javascript" src="js/ux/mif/miframe-debug.js"></script>
<script type="text/javascript" src="js/ux/mif/mifmsg.js"></script>
and function where I open a new Window with IFrame:
PHP Code:
treeNodeDblClick: function(node, e) {
var win = new Ext.Window({
title: 'Report',
width: 800,
height: 600,
maximizable: true,
closable: true,
border: false,
layout: 'fit',
items: [{
xtype: 'iframepanel',
border: false,
width: 800,
height: 600,
loadMask: {
msg:"Loading..."
},
defaultSrc : 'http://www.google.com/'
}]
});
win.show();
},
any help appreciated.



Reply With Quote

