PDA

View Full Version : ifame in panel



iomar
18 Jul 2010, 5:46 AM
i try to add iframe to panel using this code


demos.Buttons = new Ext.Panel({
scroll: 'vertical',
layout: 'fit',
modal: true,
items:{
layout: 'fit',
align: 'stretch',
xtype: 'panel',
styleHtmlContent: true ,
scroll: 'vertical',
html: '<iframe width="100%" height="100%" scrolling="yes" style="border:1px solid black; overflow:auto;" src="../../../Omar.pdf"> </iframe>'

}
});
but the content at the end of iframe hide see the photo
21496

evant
18 Jul 2010, 4:10 PM
Works ok for me:



Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function() {

new Ext.Panel({
fullscreen: true,
html: '<iframe src="a.pdf"></iframe>',
listeners: {
resize: function(c, w, h){
c.body.child('iframe').setSize(w, h);
}
}
});
}
});


Tested on the iPad.

iomar
21 Jul 2010, 5:30 AM
thanks
but i can't scrolling :)

dead_end
16 Oct 2010, 5:24 AM
I encountered the same problem with PDF and scrolling on iPad: PDF rendering basically works with both
<iframe src="sample.pdf"> and
<embed src='sample.pdf'> tag. But this apparently renders only the section visible on setup and when it comes to scrolling the rest of the document is cut-off.
Any solutions for that?

tomtim
24 Feb 2012, 5:43 AM
thanks

krislogy
27 Feb 2012, 5:06 AM
It is not because of Sencha or JavaScript. The source of the problem is in the phones themselves, and we cannot do anything about it, except for hacks (or so I've heard) here n there (which, again, is not advisable).

Well, "scrolling" IS possible inside an iframe. But, that is with a two-finger scroll. More details about why at apple support page (http://support.apple.com/kb/HT1484).
Now you know how to "scroll" the iframe. But, will your website users know that as well?? And that is pretty much why iframes are not advisable on phones. (Agreed, that's a bummer! But thats the way it is, until the phone companies do anything about it... :-( )

DISCLAIMER: This is the information I discovered (through many failed attempts) and gathered from internet (searching for about 1-2 months). But, anyone, please correct me if I'm wrong or if there's a way out. I'll be the happiest of the lot actually.!