PhoneGap/Cordova. childBrowser plugin giving starnge URL (iOS)

Posted by MeltingDog on Stack Overflow See other posts from Stack Overflow or by MeltingDog
Published on 2012-07-01T03:08:42Z Indexed on 2012/07/01 3:15 UTC
Read the original article Hit count: 299

Filed under:
|
|
|

I am having a great deal of difficulty getting the childBrowser plugin to work

Currently when I click my link it does nothing on my iOS simulator and when I click it using a browser I get a Web Page Not Found error with the web address looking something like:

file://myapp/www/%C3%A2%E2%82%AC%C2%9D#???????

I am really stuck for ideas on whats going on and what is causing this, any advice would be greatly appreciated.

My code is:

<script type="text/javascript" charset="utf-8" src="js/ChildBrowser.js"></script>
        <script>
            function onDeviceReady() {
                childbrowser = ChildBrowser.install();
                var root = this;
                cb = window.plugins.childBrowser;

                if(cb != null) {
                    cb.onLocationChange = function(loc){ root.locChanged(loc); };
                    cb.onClose = function(){root.onCloseBrowser(); };
                    cb.onOpenExternal = function(){root.onOpenExternal(); };
                    //cb.showWebPage(“http://google.com”);
                                   }
                                   }

                                   function onCloseBrowser() {
                                   console.log(“onCloseBrowser!”);
                                   }

                                   function locChanged(loc) {
                                   console.log(“locChanged!”);
                                   }

                                   function onOpenExternal() {
                                   alert(“onOpenExternal!”);
                                   }        

<body onLoad=”onBodyLoad()”>
<a href=”#” onclick=’cb.showWebPage(“http://www.google.com”);’>Click Me</a>

© Stack Overflow or respective owner

Related posts about ios

Related posts about phonegap