-1

I am working on an application in which we open all the views in a tabPanel, it was pretty simple to do that.

Now we got a new requirement where we have to open the view in Browser popup window so that it can be dragged to a secondary monitor. Ext.Window will not work.

we have a single page application and not sure how i can open a view in separate browser window.

i have tried the following, but then no JS events works on the new window:

var OpenWindow = window.open('', windowName, 'width=330,height=200,resizable=0');
OpenWindow.document.body.appendChild(divObj);//divObj is a div object in which i rendered the extjs view.

it open the popup but non of the style or js is working.

please help or point some example where it is accomplished.

Thanks in advance.

Vikram
  • 8,235
  • 33
  • 47

1 Answers1

0

When opening a new window it doesn't have any information about ExtJS at all. you will need to include extjs into the new windows html. The best way to do this is to create a new popoup index file or page to be called. so say you are using routers properly in extjs say you have a site called http://testsite.com Then you can in your window being opened create the elements in your current application to load when calling testsite.com/#popup then you just place it into your window.open. If you are managing your calls with something like PHP and using a framework for routing you can set it up the same way and have your javascript and extjs to be called from it as well.

var OpenWindow = window.open('http://testsite.com/#popup', windowName, 'width=330,height=200,resizable=0');

Reccomend creating a router like this: Extjs Routing Guide and from there have the component brought into focus on the page and placed that url into your popup if no backend system is used. Creating a new route in a backend link would be the best way to go, but you will still need to call your extjs applications components into your new page as well.

Asheliahut
  • 901
  • 6
  • 11