开发者

access ExtJS from iframe

开发者 https://www.devze.com 2023-01-11 05:53 出处:网络
I have an intranet web application which uses iframes. The outer web-page has a menu and an iframe. The inner webpage is loaded inside this iframe based on the selected menu item in the outer page. Al

I have an intranet web application which uses iframes. The outer web-page has a menu and an iframe. The inner webpage is loaded inside this iframe based on the selected menu item in the outer page. All the pages are using lots of ExtJS, so in order to minimize the number of times extjs library is loaded I have decided to load it only once in an outer page and reference it from the inner pages like:

new top.Ext.grid.GridPanel();

I understand that I have to use document.getElementById() function to specify renderTo. But I still got errors. Is it even possible to use ExtJs this way? And wha开发者_开发问答t are the other limitations?


Couldn't disagree more with the comments under neath the question.

Whilst Ext Js files will be cached there is a big overhead in loading the Ext app multiple times. I've tried 4 iframes with ext in firefox and it crashes under the load.

You should be loading the content using the Updater object or via Panel.load().


Why are you using IFrames to load your content? That's soooo 1995.

You are aware that there's this thing called AJAX that allows you to load separate pieces of content on at different times on the same web page right?

Are you using a Viewport at all to organize your content? You might perhaps think about leveraging the objects in the ExtJS library to build up your page instead of embedding them into the HTML.

0

精彩评论

暂无评论...
验证码 换一张
取 消