Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ali_R_
Beginner
46 Views

load url using inAppBrowser while retaining the layout

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

 

Tags (2)
0 Kudos
1 Reply
Amrita_C_Intel
Employee
46 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

Reply