title: Phonegap: BarcodeScanner & Childbrowser plugins
body: <p>I'm facing a problem using this 2 PhoneGap plugins: "BarcodeScanner" &amp; "ChildBrowser" (inside an iOS app, with XCode 4 &amp; PhoneGap 2.0).</p>
  
  <p>I've a button "Scan" on my app UI. When the user clic on this button, the barcode scanner is launched. </p>
  
  <p>So, in the Success function of the barcode scanner callback, I need to open the recovered URL from the scan in a new Childbrowser window (inner the app).</p>
  
  <p>But the new Childbrowser window is never been opened, while the console displays "Opening Url : <a href="http://fr.wikipedia.org/" rel="nofollow">http://fr.wikipedia.org/</a>" (for example).</p>
  
  <p>Here is my JS part of code:</p>
  
  <pre><code>$("#btnStartScan").click(function() {
         var scanBarcode = window.plugins.barcodeScanner.scan(
                             function(result) {
                                      if (!result.cancelled){
                                           openUrl(result.text);
                                      }
                              },
                              function(error) {
                                      navigator.notification.alert("scanning failed: " + error);
         });
   });
  
  function openUrl(url)
  {
        try {
            var root = this;
            var cb = window.plugins.childBrowser;
  
            if(cb != null) {
                      cb.showWebPage(url);
            }
            else{
                alert("childbrowser is null");
            }
         }
         catch (err) {
             alert(err);
         }
  }
  </code></pre>
  
  <p>And all works fine if I call my openURL() function inside a Confirm alert callback for example, like this:</p>
  
  <pre><code>if (!result.cancelled){
          navigator.notification.confirm("Confirm?",
                                         function (b) {
                                                if (b === 1) {
                                                     openUrl(result.text);
                                                }
                                         },
                                         'Test',
                                         'Yes, No');
   } 
  </code></pre>
  
  <p>But I need to launch the ChildBrowser window directly after a scan, without any confirm alert etc.</p>
  
  <p>Does anybody know how to solve this please?</p>