Dec 03, 2012, 2:12 PM
[FIXED] [1.7] [2.2] Panel IFrame content load
Hello,
I have an update request. I use IFrame as a Ext.Net.Panel content, and I use Ext.Net.History object to handle hash change and reload the content of IFrame. I have a problem when user presses browser's back button. First press do not change url of main window, but reloads IFrame. Second press changes url and fires direct event. This is normal behavior of IFrame.
This can be fixed by changing javascript function "loadIFrame" of Ext.Net.Panel (I just assume it belongs to this object).
Current function (line 7):
I dont know, if this is possible to do, or if you are willing to do it, but i would appreciate it.
Or... can you please give me an advice how to solve my problem with navigation in browsers history?
Thanks a lot!
I have an update request. I use IFrame as a Ext.Net.Panel content, and I use Ext.Net.History object to handle hash change and reload the content of IFrame. I have a problem when user presses browser's back button. First press do not change url of main window, but reloads IFrame. Second press changes url and fires direct event. This is normal behavior of IFrame.
This can be fixed by changing javascript function "loadIFrame" of Ext.Net.Panel (I just assume it belongs to this object).
Current function (line 7):
...
this.iframe.dom.src = String.format("java{0}", "script:false");
this.fireEvent("beforeupdate", this, {
url: this.iframe.dom.src,
iframe: this.iframe
});
this.iframe.dom.src=url; // !!! this causes that browser adds iframe url change to browsing history !!!
this.beforeIFrameLoad(config);
...
Updated function (line 7):...
this.iframe.dom.src = String.format("java{0}", "script:false");
this.fireEvent("beforeupdate", this, {
url: this.iframe.dom.src,
iframe: this.iframe
});
window.frames[this.iframe.id].location.replace(url); // Or something like that. Important is to use replace function of window.location object.
this.beforeIFrameLoad(config);
...
I think this option should be in config, that enters to function "loadIFrame", and of cource to function "load" which calls "loadIFrame". And in the end, option should be in C# object "Ext.Net.LoadConfig", for example as property "IFrameLoadMode".I dont know, if this is possible to do, or if you are willing to do it, but i would appreciate it.
Or... can you please give me an advice how to solve my problem with navigation in browsers history?
Thanks a lot!
Last edited by Daniil; Dec 10, 2012 at 5:59 AM.
Reason: [FIXED] [1.7] [2.2]