Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

open an external link within the app so that I can keep header and footer etc

I want to open an external link inside a window within a page, keeping header and footer etc. Can I do this?

I have tried an iframe inside a html component, but I can't seem to size it to fit available space and it always appears as a small window with scrollbars.

I have tried:

windows.open("[url=http://google.co.uk",blank]http://google.co.uk",blank[/url]);

which I think is how you use the inapp browser and it gives me the header, footer but the content is blank.

I have tried:
<iframe src="http://theploughonthegreen.co.uk" width="100%" height="100%" seamless></iframe> within a html component and i get the width, but the height doesn't change, nomatter what i try:

Image

The problem here seems to be the html component. Setting its height to 100% doesn't work, but if I set it to 500px for example, it will increase the height.

What I really want is for the html component to stretch to the available windows size.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

open an external link within the app so that I can keep header and footer etc

I think, that I have found a solution:

I added the following js to the load event of the page:

pre
$(window)&#46;resize(function () {
Apperyio("html_3")&#46;css("height", ($(window)&#46;height()-76) + "px");
});

Apperyio("html_3")&#46;css("height", ($(window)&#46;height()-76) + "px");/pre

The minimum height of the header and footer are 38px so subtract (2 * 38) from the window height to find the desired height of the html component.

The resize function is required so that it will adjust to a rotated device.

It also works in a standard pc browser,

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

open an external link within the app so that I can keep header and footer etc

Hello Terry,

Thank you for this update.
Glad it is working as expected.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

open an external link within the app so that I can keep header and footer etc

No I still have a problem, it doesn't work with secure pages. You can't access pages with the https: protocol, only http

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

open an external link within the app so that I can keep header and footer etc

Hello Terry,

Please remove a frame from the app browser preview and change a URL from http to https and check it again

Return to “Issues”