View Full Version : How to display an internet page on a window?
Elfayer
19 Jul 2012, 3:38 AM
Hi,
I would like to know which configs of a window do I have to use to open an internet page like "google.com" on it.
redraid
19 Jul 2012, 4:00 AM
Use iframe http://docs.sencha.com/ext-js/4-1/#!/api/Ext.ux.IFrame
Elfayer
19 Jul 2012, 4:06 AM
Use iframe http://docs.sencha.com/ext-js/4-1/#!/api/Ext.ux.IFrame (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.ux.IFrame)
Yes, I read that, but I didn't find where do I have to put the url.
redraid
19 Jul 2012, 4:12 AM
{
xtype: 'uxiframe',
src: 'http://google.com'
}
Elfayer
19 Jul 2012, 4:43 AM
That doesn't work.. I must be mistaken somewhere.
var win = Ext.create('DSK.view.desktopCenter.WindowApplication', {
title: appli.get('apl_label'),
items: [{
xtype: 'uxiframe',
src: 'http://google.com'
}]
Ext.define('DSK.view.desktopCenter.WindowApplication', {
extend: 'Ext.window.Window',
alias: 'widget.windowapplication',
width: 300,
height: 200,
minimizable: true,
maximizable: true
})
redraid
19 Jul 2012, 5:58 AM
You need require uxiframe:
Ext.Loader.setConfig({
enabled : true,
paths : { 'Ext.ux': path to ux }
});
Ext.require(['Ext.ux.IFrame']);
sdt6585
19 Jul 2012, 6:00 AM
You can always just code an iframe into the component's html config
Ext.create('Ext.window.Window', {
title: 'Hello',
height: 200,
width: 400,
layout: 'fit',
autoScroll: true,
html: "<iframe src='http://www.stephentremaine.com' height=100% width=100%></iframe>",
renderTo: Ext.getBody()
}).show();
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.