View Full Version : How to show a Window contains a remote html page?

10 Nov 2010, 9:49 AM
Hi everybody,

I have a URL link of a remote html page, I want to create a window and the html page would contained in the window. In other words, a window shows and the html page plunge in the window. How should I do? thanks

10 Nov 2010, 10:41 AM
IFrame component.

var global_iframe_id = 0;
Ext.ux.IFrameComponent = Ext.extend(Ext.BoxComponent, {
onRender : function(ct, position) {
global_iframe_id += 1;
this.el = ct.createChild({tag: 'iframe', id: 'iframe-'+ global_iframe_id, frameBorder: 0, src: this.url});

var win = new Ext.Window({
title: 'Example',
width: 500,
height: 500,
items: [
new Ext.Panel({
layout:'fit', // layout to fit child component
items: [ new Ext.ux.IFrameComponent({ url: YourURL }) ]



warning: Not tested. My actual code is slightly different as it allows "hybridizing" two windowing systems (ExtJS and an in-house one) within each other.

10 Nov 2010, 7:49 PM
Thanks very much. It's wonderful way. I want to know whether the way your supply is to download the url link page when render the iframe? Because the url in local will be loaded very quick but remote not, for example www.google.com or www.yahoo.com.