View Full Version : Resize window on tab changed

20 Jul 2009, 4:52 AM
Hi everybody!

I currently successfully added advanced tabPanels to my web application. Now, I'm adding normal tabpanel. On my main application, I click on a button that open a popup window via window.open( ... ). This page contain the tabPanel, which contain 3 tabs.

During the "ontabchange" event of the tabPanel, I'm resizing the window and the tabPanel height. It can seem weird, but it looks better than having a really tall window when there is only one big panel's content among all panels.

On Firefox, everything is working great. On IE, it's not. IE gives me an "Access Denied" error when using "self.resizeTo(x, y)".

When using for exemple a click event inside the tab content, it's working. So, it seems that I can resize the popup only when everything is loaded...

Is there a workaround? another event that I can use?

Thanks in advance for any help.

27 Jul 2009, 4:45 AM
Nobody have an idea?

"window.resizeTo" and "self.resizeTo" don't work on IE6 or IE7, but work in Firefox.

Using an AJAX TabContainer and resizing the window during "OnClientActiveTabChanged" event, it's working great on IE6-7 and Firefox.
But, I want to keep the extJS tabs to keep the same look in the website.

Someone knows the reason why this "Access Denied" error happens in IE only?

27 Jul 2009, 4:52 AM
There is no standard covering the browser's object model.

So the capabilities of the window object are entirely browser dependent.

You must research the object model of your target browser in order to be able to use it.

27 Jul 2009, 5:07 AM
Hi Animal,

Can you enlighten me a little?

From what I've read, isn't the "window" object the top object of the browser object model?

How can I retrieve the browser object model of the current target browser instead of using the "window" keyword?

Or maybe I'm confuse about what you've said?

27 Jul 2009, 6:07 AM
window is what you want. It encapsulates the browser window.

But you have to learn what that does. By reading the browser manufacturer's documentation.

28 Jul 2009, 9:09 AM
I don't understand how this should help me :-/

The object window is already there and it should work. Why is this working with AJAX TabContainer, but not with extjs Tabs? I'm only resizing the popup window that I open.