Site not loading in inappbrowser

462 Views Asked by At

I am using phonegaps inappbrowser to show my site. Site is working fine with phones browser. But when I implement it through eclipse and embed a inappbrowser it does not show. My code for index.html is as follows.

<!DOCTYPE html> 
<html>
<head>
<meta charset="utf-8">
<title>Opprox</title>
<link rel="stylesheet" href="css/jquery.mobile-1.4.2.min.css"> 

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>

<script type="text/javascript" charset="utf-8" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.3.min.js></script> 

// Wait for Cordova to load
//
function onLoad() {
    document.addEventListener("deviceready", onDeviceReady, false);
}

// Cordova is ready
//
function onDeviceReady() {

var ref = window.open('http://beta.opprox.com/index.html', '_blank', 'location=no');
ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); });
ref.addEventListener('loaderror', function(event) { alert('error: ' + event.message); });
ref.addEventListener('exit', function(event) { alert(event.type); });

}
</script>

And my config.xml is

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
    xmlns:gap = "http://phonegap.com/ns/1.0"
    id= "com.opprox.beta"
    versionCode="10"
    version   = "1.1.0">

<!-- versionCode is optional and Android only -->
<name>Opprox</name>
<description>This is discription line
</description>
<author href="http://opprox.com" email="[email protected]">
            Me
</author>
<access origin="*" />

<gap:plugin name="org.apache.cordova.inappbrowser"  />
<preference name="orientation" value="portrait" />

</widget>
0

There are 0 best solutions below