3

I am trying to use the Childbrowser plugin in my application. My code is as follows:

ChildBrowser.prototype.showWebPage = function(url, options) {
    options = options || {
        showLocationBar: true,
        locationBarAlign: "top"
    };
    //Code Runs up to this point
    cordova.exec(this._onEvent, this._onError, "ChildBrowser", "showWebPage", [url, options]);
};

The last line of the code does nothing. It's not giving any errors, but the webpage is not shown. I am using Android 2.3.

Dusda
  • 3,347
  • 5
  • 37
  • 58
Prakash
  • 31
  • 1

1 Answers1

2

You seem to be defining this wrongly, I think it should look like this:

var url = "http://www.google.com";

window.plugins.childBrowser.showWebPage( url, {showLocationBar: true});// This opens the webpage.

I do not quite get why you have used the ChildBrowser.prototype.showWebPage

Sahil Mahajan Mj
  • 11,033
  • 8
  • 53
  • 100
user1540792
  • 88
  • 1
  • 1
  • 8