Here is my code:
<script src="include/cordova.js" type="text/javascript"></script>
<script src="include/sencha-touch-all.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="include/childbrowser.js"></script>
<link href="include/sencha-touch.css" rel="stylesheet" type="text/css" />
var childBrowser = null;
if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) {
document.addEventListener("deviceready", onDeviceReady, false);
} else {
onDeviceReady();
}
function onDeviceReady(){
console.log("PhoneGap is Ready");
childBrowser = ChildBrowser.install();
}
function openChildBrowser(url)
{
try {
var cb = new ChildBrowser();
console.log(cb);
cb.showWebPage('http://www.google.com');
}
catch (err)
{
alert(err);
console.log(err);
}
}
...
There is another code that is not related, but when I call openChildBrowser(), I get the following error:
Uncaught TypeError: Object #<Object> has no method 'exec'
I believe this is a reference to a childbrowser call that calls exec on an object cordova.
When I look at an object cordvoa, I do not see the function execanywhere ...
Any ideas?
source
share