0

I have an app build upon PhoneGap. The app contains only one index.html file that contains PhoneGap dependant js and plug-in files files and its working fine. In the index.html file, am using window.location to load an url from server. I want to call childbrowser plug-in from the server html file included in the app using window.location. That means the html file loaded from server has anchor links that would be loaded in child browser. I have tried by including childbrowser plug-in in to the app and called the event from server js, but it is not working. Any idea. Please help

Ansad
  • 61
  • 2

1 Answers1

0

As soon as you set window.location to a URL on your server and leave index.html, PhoneGap is no longer loaded, so you can't use ChildBrowser.

Instead of setting window.location, you need to use childBrowser.showWebPage() in index.html:

window.plugins.childBrowser.showWebPage( 'example.com/your-page-on-server' );
ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239