titanium open new url
Asked Answered
M

3

10

I would like to open a new url in the default browser when the user clicks on an image. I have looked into the Titanium.Platform.openURL but don't know how to use it.

any help is appreciated

Mezcaline answered 27/2, 2011 at 1:8 Comment(0)
K
21
Ti.Platform.openURL("http://m.google.com"); //replace string lit with your url
Kobold answered 27/2, 2011 at 5:39 Comment(2)
The link needs to have http:// in front of it as this method is also used for calling ect.Linsang
Only works if the webpage you're opening doesn't have a strict SAME_ORIGIN policyBascule
J
2

You just pass the URL you want to open on the click event as the parameter to openUrl

Jollanta answered 27/2, 2011 at 3:36 Comment(0)
F
1

make sure the link has "http://" in front or it won't do anything

Faizabad answered 4/3, 2011 at 8:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.