-
12 Jan 2012 8:59 AM #1
Unanswered: displaying scrollable iframe content
Unanswered: displaying scrollable iframe content
Screen Shot 2012-01-12 at 11.16.50 AM.pngHello,
I'm trying to load an outside webpage in an iframe in my sencha touch app. The webpage is of dynamic height so I need the iframe to be scrollable within the sencha touch app. I have been able to get the page to scroll, but the underlying iframe does not render any of the web content below the initial 'viewport'. Here is my code. Does anybody have any ideas?
Code:App.views.Help = Ext.extend(App.views.Base, { title: 'Help', mainLevel: 10, subLevel: 1, backButton: 'dashboard', forceTab: App.OTHER_TAB, forceSideTab:App.HELP_TAB, layout: 'fit', bodyPadding:0, items: [{ xtype: 'panel', scroll: 'both', items: [{ id: 'iframe', layout: 'vbox', width: '100%', height: '2000px', html: ['<div style="width:100%;height:2000px;position:fixed;top:0;left:0;background-color:Transparent;float:left;z-index:99;"></div>', '<iframe style="position:fixed;top:0;left:0;float:left;z-index:1;" width="100%" height="2000px" src="http://mvretail.assistly.com/customer/portal/topics/118700-mobile-basics"></iframe>'] }] }] /* OLD attempts html: '<iframe style="overflow-y: scroll; -webkit-overflow-scrolling: touch" width="1000px" height="1200px" src="http://mvretail.assistly.com/customer/portal/topics/118700-mobile-basics"></iframe>' html: '<div style="overflow-y: scroll; -webkit-overflow-scrolling: touch"><iframe width="1000px" height="1000px" src="http://mvretail.assistly.com/customer/portal/topics/118700-mobile-basics"></iframe></div>' */ });
-
12 Jan 2012 10:33 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
iframes on a mobile device isn't recommended and scrolling within them is very counter-intuitive.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
12 Jan 2012 10:38 AM #3
What would be the recommended way to accomplish what I'm trying to do?
-
13 Jan 2012 7:00 AM #4
Mitchell,
You're response is so 'Animal' like. Don't know if you were around back when 'Animal' was patrolling the forums for Ext, but he did a great job of not helping people and making Sencha look like it's run by a bunch of arrogant punks with no mind for the negative impression employees can create for their company. Are you interested in helping people to be able to use your product? If so, I'd recommend at least sending someone in a productive direction to solving their issue. The response you gave me does nothing to help.
So, do you have any input for me other than what I'm doing is wrong? Is there any other way I could accomplish loading in a remote webpage to a mobile device using sencha touch?
-
13 Jan 2012 7:14 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Been around since early 2007 so yeah I know Animal and have been one of the lucky few to be helped by him. Yes, his methods are unconventional but I made them helpful.
My answer is meant as lots of things like an iframe take a two-finger scroll which is a bad UI design. That if Sencha Touch doesn't capture the scroll attempt in the first place.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Jan 2012 9:29 AM #6
Right, got it; IFrame support is lacking in Sencha Touch. Is there any other way to accomplish what I'm trying to do if I have no control over the web page I'm trying to display? Looking for solutions, not reasons why I can't do something.


Reply With Quote