Is it possible to embed site "X-Frame-Options: SAMEORIGIN" in phoneGap?
1 answer
You can use the Cordova In-App-Browser plugin to open external websites. This will open a modal with the website you specified.
Below is a sample code to open google.com, make sure you have installed the plugin "In App Browser" from Intel XDK settings -> -> Plugins
<!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>
<script>
function openIAB(){
var url = "http://google.com";
window.open(url, "_blank", "location=yes");
}
</script>
</head>
<body>
<button onclick="openIAB()">Open Google</button>
</body>
</html>
documentation for the App Browser plugin: https://github.com/apache/cordova-plugin-inappbrowser
+2
source to share