Sir,
I am using HTMLview to show a webpage with our app. The problem is that HTMLview is not covering full screen. I have also tried to mention height 100%, but HTMLview is not responding.
Please guide, how can HTMLview cover full screen.
Thanking you
Code is :
"<iframe height='100%' src='http://www.shellcomputer.in'></iframe>"
ghenne
August 8, 2018, 10:40am
2
Are you using any jQuery Mobile controls? jQM can mess this up - but there is a workaround.
No, I am not using any jQuery Mobile Controls. I have simply open a new project and place HTMLView. In innerHTML property, I have written
<iframe height='100%' src='http://www.shellcomputer.in'></iframe>
ghenne
August 8, 2018, 11:39am
4
Here’s how I set it up in a recent project.
I used a Container, not an HTMLview.
attributes set to width=“100%”
style set to -webkit-overflow-scrolling:touch;
I set the value of the Container at runtime as follows:
style = 'height:calc(100% - 20px); width:100%;';
Container1.innerHTML = `<iframe style='${style}' srcdoc = '${htmlAGB}' ></iframe>`;
I have also found a solution.
Form1.onshow = function() {
var frameheight;
var framewidth;
frameheight=Form1.Height;
framewidth=Form1.Width;
HTMLview1.innerHTML="<iframe height="+frameheight +" width=" + framewidth + " src='http://www.shellcomputer.in'></iframe>";
};
ghenne
August 8, 2018, 1:03pm
6
Great - be sure to test on the devices you will be using, especially if scrolling is involved.
FrankR
April 29, 2019, 6:13pm
7
Anybody care to speak to - current best practices for doing this?
Some elements of iframe were deprecated in HTML5. What is considered a best practice for displaying another page inside of an app.
ghenne
April 29, 2019, 7:13pm
8
Can you post this as a new topic?