View Full Version : Transfer component to a new browser window problem

18 May 2014, 11:40 PM

I have a question, perhaps someone could assist me with this issue.

I have an ExtJS Window with a form panel loaded in it. At the bottom of this formpanel there is a toolbar with buttons and menus). I have a small tool button which allows me to pop-up this window in its own browser window using window.open(). I am transferring the content of that ExtJS Window to the newly opened browser window using the add() function and passing the object over.

All is well and it works well except for the menus from those buttons. When I click on the button it opens the menu, but it still shows it in the original parent window. How do I make the menu render to the new window instead of the originating window?

I thank you in advance...

19 May 2014, 12:52 AM
Hmm, that's a cross-browser scripting that is almost always tricky. Cannot you do away with the new browser window and handle the all logic with Ext.Window? The other browser window is independent, it needs its own copy of Ext and application loaded and implementing communication between opener and the window is not trivial.

27 May 2014, 4:20 AM
Hi yes - thank you for coming back to me
I managed to do a few tricks here and there, but the ultimate thing that worked best is to recreate the components in the new window and simply transfer the data between the windows..!

I can't do away with using browser windows and as much as a lot of developers out there are against pop-ups, it makes life easier if you want to take the work in a different workspace without closing other windows by mistake..!

I am building an ERP app and it makes sense to have a window for one quotation and another one for a different quotation..! Everything within one window becomes too much for the user's eye as there are too many lines, and too many windows and what not..!

Thanks anyway

1 Jun 2014, 12:07 PM
Although I understand the need of simplifying UI, I still don't think that opening browser popups is the way. We have many useful components and layouts in Ext: windows, card layout, tab panel, accordion, etc. I have architected and written many huge Ext applications w/o the need of browser popups.