xus
xus

Reputation: 2607

How do we open an external link from a Phone Gap iPhone application in a new window?

I'm trying to launch an external link using phone gap with that code, but it just raises the alert, and after that nothing happens! :-(

$("#externalLink", $(this)).click(function(){
    alert('I´m here!');
    window.location.href('http://www.wordreference.com');
});

I also tried to use a direct "" link directly in the HTML code, but it also does not work :(

Any idea?

Upvotes: 1

Views: 1310

Answers (2)

Daniel Kurka
Daniel Kurka

Reputation: 7985

Take a look at the childbrowser plugin here: https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/ChildBrowser

it lets you open external pages in a seperate browser window.

Upvotes: 1

Related Questions