Here is the part of my mobile app I can't make work. The idea is that when user taps on a particular element (say a link), I need an external url to be loaded and displayed on the screen with specific bars on top and bottom. And a user should be able to navigate through links on this webpage. So here is what I tried:
iFrame
I tried to load websites using iFrame. Worked, but some of them do not allow to be loaded in the iFrame. For example google.com, youtube.com, theguardian.co.uk. Even if I have in my config.xml
<access origin="*" />
.load();
jQuery .load() function works somewhat better. It can load google.com, for example. But some images would be missing from the webpage. And search won't work there. Probably it can be solved somehow with a relative path, but I had no luck trying to make it work.inAppBrowser Plugin
It can load pages, indeed. But what I need is a top and a bottom bar on top and on the bottom of the webpage view. I need it in order to have a quick access to some particular function of my app. And design-wise. Haven't found a workaround here. Tried childBrowser also, but it seems it is not supported anymore.
Since I am kind of desperate already, I will consider any solution you can suggest. Would be super great if it can be solved by some plugin and some JS code, but I understood already that I am not in the position to demand :\
So, for example, here is my html code:
<div id="main-screen">
<div id="links">
<a href="http://google.com" class="link">
Google
</a>
<a href="http://youtube.com" class="link">
YouTube
</a>
</div>
</div>
<div id="web-container">
<div id="top-bar">
</div>
<div id="web-content">
</div>
<div id="bottom-bar">
</div>
</div>
And this an example of what I am trying to do:
$(document).on('click','a',function(e) {
$('#main-screen').hide();
$('#web-container').show();
$('#web-content').load($(this).attr('href'));
});
Expected result is to see a page fully loaded in a div, framed on top and bottom by custom html based bars.
Don't hesitate to ask for any further information, I am pretty sure there is something you can particularly be interested in.
Thank you in advance.