This is a migrated thread and some comments may be shown as answers.

Tabstrip menu and external pages

3 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 2
Hans asked on 15 Dec 2013, 05:48 AM
Hello,

I'm looking for a way to load an external url into a view in such a way that the tabstrip menu stays visible.
Tried all sorts of things, iframes, url load methods etc all to no avail.
Is there a way to use the inappbrowser in conjunction with a tabstrip menu?
Any hint to get a browser working with a tabstrip is highly appreciated...

Thanks, Hans.

3 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 15 Dec 2013, 04:17 PM
Hi Hans,

I was able to get an IFRAME to render by inserting a view into the tabstrip as follows:

    <div id="tabstrip-web"
        data-role="view"
        data-title="Web"
        data-show="app.logViewStart" data-hide="app.logViewEnd">

        <div class="view-content" id="iframe-container" >
            <iframe src="http://www.slashdot.org" >IFRAME not supported</iframe>
        </div>
    </div>

This rendered correctly in the simulator but not my device (the IFRAME was sized to only a portion of the view size).  To get this to fill the space, I added styles to main.css:

#iframe-container, #iframe-container iframe {
    border: none;
    height: 100%;
    width: 100%;
}

This now behaves as expected in Android (Nexus 4).  On my iPad, unfortunately, the IFRAME displays correctly but is not scrollable (I tried overflow: scroll to no avail).  Any help there is appreciated...

One thing that might mess with your testing: if you use "http://google.com" as your test URL (as was my first choice), Google actually sends back headers in the response that prevent their pages from being wrapped in an IFRAME (others may as well).
0
Hans
Top achievements
Rank 2
answered on 15 Dec 2013, 05:53 PM
Andrew, thanks for your reply!
I had the exact same thing, found by coincidence via the console that google was blocking the results.
For that reason alone I'm thinking an iframe is not the way to go.

All I need is a browser I can use (for instance after scanning a barcode) so that there is a way to get back from the browser to the application. On Androids I can use the back button but iphones don't have one.
There has to be a way to implement this...

Any thoughts?

Thanks, Hans.
0
Steve
Telerik team
answered on 16 Dec 2013, 09:38 AM
Hi guys,

Loading external URL into a view is not a supported scenario. Using iframe or InAppBrowser to load such URLs is the correct way. InAppBrowser has a Done button, when clicked, the user would be returned to the app that opened it.

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
General Discussions
Asked by
Hans
Top achievements
Rank 2
Answers by
Andrew
Top achievements
Rank 1
Hans
Top achievements
Rank 2
Steve
Telerik team
Share this question
or