[ 
https://issues.apache.org/jira/browse/CB-13657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jcesarmobile closed CB-13657.
-----------------------------
    Resolution: Not A Problem

Executescript is executed inside the InAppBrowser and InAppBrowser doesn't have 
access to the Cordova webview nor the plugin APIs, so your window.open is 
really calling window.open inside InAppBrowser, and the targed doesn't matter 
there, it will always open inside the InAppBrowser

If you want to open certain urls outside the InAppBrowser, you can probably 
listen for the loadstart event and if the url is one of the urls you want to 
open outside then call window.open with _system there

> InAppBrowser not opening links in system browser
> ------------------------------------------------
>
>                 Key: CB-13657
>                 URL: https://issues.apache.org/jira/browse/CB-13657
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios
>            Reporter: veenapani
>            Assignee: Suraj Pindoria
>
> I'm trying to open few links inside my application in safari browser (for 
> ios) or chrome or other default browser's (for android) . I'm unable to get 
> this to work, any help is highly appreciated. Below is my code:
> {code}
>  var target = "_blank";
>         var options = 
> "toolbar=yes,closebuttoncaption=,location=no,hardwareback=yes";
>         authDialog.authenticate('https://mytimebeta.cerner.com/','' ,'' 
> ,'','',1);
>         var inAppBrowserRef = 
> cordova.InAppBrowser.open('http://M1525246:9008/', target, options);
>         inAppBrowserRef.addEventListener('loadstop', function(event) {
>                              inAppBrowserRef.executeScript({
>                                                file: 
> "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js";
>                                                }, function() {
>                                                inAppBrowserRef.executeScript({
>                                                                              
> code: "jQuery('#timeExpense').on('click', function() 
> {window.open('http://www.google.com','_system') });"
>                                                                  });
>                                                });
>                              
>                              });
> {code}
> Note:
> If I initialize var target = "_system"; the whole application is opening in 
> safari and we don't want to do that. However, in my jQuery code inside the 
> addEventListener, the _system is not working.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to