Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

Open link from webview

$
0
0

How can i open a link from webview ?

I use this code but it's doesn't work :

var textHTML = '<a href="http://www.google.com" ';
textHTML += 'onclick="Titanium.App.fireEvent(';
textHTML += '"openURL", { url: "http://www.google.com"}); return false;"';
textHTML += ' >Test link</a>';

Ti.App.addEventListener('openURL', function(e){
    alert('test');
    //Ti.Platform.openURL(e.url);
});

framework : 3.2.0 GA

I need to open safari or a popup window that have inside webview.

thanks


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>