iOS - breaking out to websites

18 views
Skip to first unread message

AndroidCurious

unread,
Jun 1, 2012, 2:11:13 PM6/1/12
to phonegap
Hi

Am still finding my way around Phonegap so I'm sure I'm missing
something obvious...

I've got my HTML5 pages working nicely in iOS - both on the simulator
and my physical device

All seems well apart from I'm not able to break out from the app to an
external website

Could a kind soul point me in the right direction

Thanks

David Risner

unread,
Jun 1, 2012, 2:15:35 PM6/1/12
to phon...@googlegroups.com
Here is what has worked for me. I don't know if it is all necessary:

- Make sure the website is in the white list in Cordova.plist (you can
use * as a wildcard).
- Add attribute target="_blank" to the href
- Add attribute rel="external" to the href

I have not been able to get an external link to open in Safari using
just Javascript.

--
David Risner
Software Engineer
MERLOT, California State University
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com

seasp...@gmail.com

unread,
Jun 2, 2012, 12:34:18 PM6/2/12
to phon...@googlegroups.com
rel="external" is not necessary. Pretty sure that window.open() also works.
--
Learn Bird Songs, Support Conservation: http://www.larkwire.com
Bikewise: http://www.bikewise.org

jcesarmobile

unread,
Jun 3, 2012, 8:58:17 AM6/3/12
to phon...@googlegroups.com
Anyway, it's better to use childbrower plugin to load the external webs, so the user don't leave your app
Reply all
Reply to author
Forward
0 new messages