Hybrid View
-
8 Mar 2012 9:13 AM #1
Answered: iframes
Answered: iframes
Is it possible to have an iframe on the page using sencha touch?
-
Best Answer Posted by arthurakay
I guess you could use CSS:
- http://stackoverflow.com/questions/4...r-on-an-iframe
-
8 Mar 2012 11:18 AM #2
This doesn't make the frame scrollable, am I missing something?
Code:items : { xtype: 'panel', scroll: 'both', items: [{ id: 'iframe', scroll: "vertical", layout: 'vbox', width: '100%', height: '100%', html: ['<div style="width:100%; position:fixed; background-color:Transparent;"></div>', '<iframe width="100%" height="100%" src="http://www.link.com"></iframe>'] }] },
-
9 Mar 2012 2:35 PM #3
There's no reason you can't have an IFRAME... Sencha Touch is simply rendering elements to the DOM, just like any other HTML file.
As for why the IFRAME in your example isn't scrollable... the URL for your IFRAME doesn't have any content, so maybe you just need to link to a page that has content taller/wider than the IFRAME itself.
-
12 Mar 2012 5:41 AM #4
The link i used here was just a dummy link. The link which I would like to use in the iframe has content in it.
This code gives output, but it even has a scroll bar inside, please look at the image.
iframe.jpg
-
12 Mar 2012 6:35 AM #5
This seems to work fine for me, using ST 1.1.1PHP Code:new Ext.Application({
name : 'App',
launch : function () {
new Ext.Panel({
fullscreen : true,
layout : 'fit',
items : [
{
xtype : 'panel',
scroll : 'vertical',
layout : 'fit',
html : '<iframe width="100%" height="100%" src="http://www.test.com"></iframe>'
}
]
});
}
});
-
12 Mar 2012 7:30 AM #6
Yes, I'm using ST 1.1, I still can't get rid of the scroll bar, it is showing the output but with the scroll bar, is it supposed to be there? I have no idea why scroll: 'vertical', not working inside the items
Code:Ext.setup({ fullscreen: true, glossOnIcon: false, scroll: "vertical", title: "title", onReady: function() { new Ext.Panel({ fullscreen : true, scroll : "vertical", items: [{ xtype: 'panel', scroll: 'vertical', items: [{ id: 'iframe', layout : 'fit', width: '100%', height: '100%', html: ['<div style="width:100%; position:fixed; background-color:Transparent;"></div>', '<iframe width="100%" height="100%" src="http://www.dummylink.com/abc.php"></iframe>'] }] }], }); } });


Reply With Quote