Software Archive
Read-only legacy content
17061 Discussions

load url using inAppBrowser while retaining the layout

Ali_R_
Beginner
353 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
353 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