Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Need to open link from inappbrowser in default system browser

  • Hello! Need some help with Monaca please.

    Im newbie here) Tryin to build first app.

    Look. I need to open link in default system browser from external page that was open at webview inside app.

    For example:

    I have “index.html” with simple link to “”. I’m opening it inside app (like target="_self") and need to open all links from “” at default browser. How and where can i do that?

    Here is my code of index.html

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta http-equiv="Content-Security-Policy" content="default-src * data:; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
        <script src="components/loader.js"></script>
        <link rel="stylesheet" href="components/loader.css">
        <link rel="stylesheet" href="css/style.css">
        <link href=",700|Montserrat+Alternates:400,700" rel="stylesheet">
    <link href=',400italic,700,700italic&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
            // PhoneGap event handler
            document.addEventListener("deviceready", onDeviceReady, false);
            function onDeviceReady() {
                console.log("PhoneGap is ready");
      $(e.currentTarget).attr('href'), '_system', '');
    <img src="include/images/logo_border.svg" style="width: 170px; margin-top: 20px;">
        <a href="" class="main">link</a>

  • @makstakeda You will need to add the InAppBrowser plugin, then use:

    <a href="#" onclick="'', '_system', 'location=yes');" >Google</a>

  • @munsterlander Nope. I already use it and it doesnt work at external pages that were loaded from app’s webview (inappbrowser). I need to go from “in app browser” (that was opened at app) to default browser by link. Is it possible?

  • @makstakeda :


    That part opens it up in the phones default browser.

    I just did a debug build to confirm it is working.

  • Hi, this answer may come bit late but the question is still valid and this may help someone.

    First, install Cordova InAppBrowser:

    cordova plugin add cordova-plugin-inappbrowser

    Then replace the (this step is not necessary, but it makes things simplier) =;

    Then you can call:

    <a href="" onclick="'', '_system'); return false;">Google</a>

    I have written more detailed blog article about the issue here