1 Reply Latest reply on Jun 2, 2016 6:36 PM by xkevin

    Anchor link inside iframe not able to open new window on browser

    Shailendra.Khadayat

      Capture.PNGThis is the screenshot of html page which is loaded via iframe inside mobile app(phonegap). The anchor link in the question is supposed to open new window in the mobile browser and it works fine on ios app but does not works on android mobile app. Does anyone has any idea on why it cannot open the link in the browser. The anchor tag looks like this <a href="http://www.google.com" target="_blank">Click</a>. Also tried using window.open(), but didn't work.

        • 1. Re: Anchor link inside iframe not able to open new window on browser
          xkevin Level 1

          I tried it on intel xdk and cordova. It might help you. Link does not work but a button will.

           

          My html code:

           

          <label>Don't have an account?

          <input type="button" class="transparent text-style link" onclick="join_browser();return false;" value="Register here.">

          </label>

           

          -Decorate your input button. It will look like this...

           

          Don't have an account? Register here.

           

          Javascript code:

           

          <script>

                      function join_browser() {

                          cordova.InAppBrowser.open('https://www.example.com/join', '_blank', 'location=yes');

                      }

          </script>

           

          I included the InAppBrowser Plugin.

          1 person found this helpful