Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

load url using inAppBrowser while retaining the layout

Ali_R_
Beginner
765 Views

Dear all,

I'm new to Intel XDK.I need a simple solution to load external url in my app inside the layout i.e. retaining the header footer i've designed. Plz help

Anxiously waiting for a solution.

Ali

 

0 Kudos
1 Reply
Amrita_C_Intel
Employee
765 Views

Easy way is to use window.location= to load URL:

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
    <script src="cordova.js"></script>
</head>
<body>
    <script>
        window.location = "http://www.yourwebsite.com";
    </script>    
</body>
</html>

Better way is to use InAppBrowser and connection Cordova plugins to load website, so that you can handle connection loss and reload, it will load complete website in background and then display, here is code: https://github.com/krisrak/html5-cordova-webapp

0 Kudos
Reply