3

Possible Duplicate:
phonegap: open an external link in Safari not the app's UIWebView

I have made an HTML5 application for my Ipad. this is made native with phonegap. On my application, I have som external links to web pages. However when I open these links, the external web-page is opened in my application, and since my Ipad doesn't have a 'back-button', there is no way to go back to my application. Even when I close the application, and then open it again, the external web-page is opened.

I have tried to solve the problem with a childbrowser, but I get the same problem with that. Here is the code I used:

openChildBrowser('http://en.wikipedia.org/wiki/Lapis_lazuli',{ showLocationBar: true });">text here</a>

and:

<a onclick= "window.plugins.childBrowser.showWebPage('http://en.wikipedia.org/wiki/Lapis_lazuli',{showLocationBar: true});">text here</a>

and I have ofcourse tried regular a href. Do anyone have a solution to my problem? Thanks for your time :)

Community
  • 1
  • 1
TorK
  • 69
  • 2
  • 9
  • Sorry do you mean if you close the application while the ChildBrowser is opened that when the app is re-opened the childbrowser is still displayed? – Simon MacDonald May 11 '12 at 13:57
  • yes, this is what I mean. I can't manage to return from the external web-page and back to my own application because the external web-page is opened in the same window, instead of in an browser (or some other solution) :) – TorK May 11 '12 at 14:00
  • @SimonMacDonald: You do not know a solution on how to open the external webpages external instead of inside the application? :) – TorK May 13 '12 at 10:29

1 Answers1

5

I had the exact same problem. I solved it by adding target="_blank" inside the a-tag like this.

<a href="http://en.wikipedia.org/wiki/Lapis_lazuli" target="_blank">text here</a>

Hope this helps.

tinnat
  • 66
  • 5