...

View Full Version : ChildBrowser



jarv
05-30-2012, 11:19 PM
Hi, I am trying to follow this tutorial:
http://hiediutley.com/2011/03/30/phonegap-tutorial-series-4-using-a-third-party-plugin/


I get the error message: "TypeError: childBrowser is undefined"




<script type="text/javascript" charset="utf-8" src="ChildBrowser.js"></script>
<script type="text/javascript" charset="utf-8">
var childBrowser;
function onBodyLoad()
{
document.addEventListener("deviceready",onDeviceReady,false);
}
/* PhoneGap has been initialized and is ready to roll */
function onDeviceReady()
{
var phoneGapReady;
phoneGapReady.innerHTML = "PhoneGap is Ready";
childBrowser = ChildBrowser.install();
}
function openChildBrowser(url)
{
try {
//both of these should work...
//window.plugins.childBrowser.showWebPage(url);
childBrowser.showWebPage(url);
}
catch (err)
{
alert(err);
}
}
</script>
<button onclick="openChildBrowser(\'http://www.google.com\')">Open Google</button>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum