PDA

View Full Version : window.open



KevinCheng
11 Sep 2008, 7:02 PM
I want to load a html page use ExtJS UI like "window.open('url','_blank','')" ,
help me please !

Thanks!

-------------------

I want to load a html page use ExtJS UI like "window.open('url','_blank','')" ,
help me please !

Thanks!

danh2000
11 Sep 2008, 8:53 PM
Your post demonstrates that you already know how to do this:

window.open

So what do you want help with?

catacaustic
11 Sep 2008, 10:21 PM
I think what the OP means is that he wants to open a standard JS pop-up window with a new URL in it.

To do this, you need to create a new Ext.Window, but have the content of that set as an iframe. The part that you have to get to understand (which can be a bit hard for new users) is that a window built using Ext isn't a separate window, it's just a HTML fragment on the browser. That's why it can't be dragged around outside of the browser, and that's also why you can't just open another URL inside it.

There's a couple of choices here. The first is to set up your window something like...
var win = new Ext.Window ({
height: 400,
width: 400,
title: 'External url',
html: '<iframe src="http://www.url.com/page.htm"></iframe>'
});The second way is to look through the extensions forum as there is a pretty good iframe handler class in there that might suit your needs as well.

mjlecomte
12 Sep 2008, 3:39 AM
The second way is to look through the extensions forum as there is a pretty good iframe handler class in there that might suit your needs as well.
...one of which is called MIF Managed IFrames.