View Full Version : Overlay load remote site and enable navigation
danisowa
16 Jan 2012, 8:26 AM
Hello,
is it possible to create an overlay that loads a remote page e.g. google and if someone clicks on a link in this overlay, the action is executed in this overlay?
if yes can you please give me some hints?
Thanks a lot
best regards
Daniel
mitchellsimoens
16 Jan 2012, 11:01 AM
You can use ComponentLoader to load a remote url. Or you can use an ajax call and set the html to a floating panel or something. Lots of ways to do this.
danisowa
17 Jan 2012, 12:53 AM
Thanks for your feedback.
do you have any example snippet for this?
danisowa
17 Jan 2012, 1:17 AM
ok i have managed to add a simple html page to a component and load this to a window
but if i click the link its opening a new window -> but link should be displayed in same component (same behaviour than an iframe)
any ideas?
var panel = Ext.create('Ext.Component',{
loader: {
url: "./test.html",
autoLoad: true,
scripts: true,
renderer: 'html',
failure: function() {
Ext.Msg.alert('Error, loading page failed');
}
}
});
alert("TEST");
var w = new Ext.Window({
width: 500,
height:500,
items:[
{ xtype: 'textfield', fieldLabel: 'First Name'},
new Ext.form.TextField({fieldLabel: 'Surname'}),
panel
]
});
w.show();
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.