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

Open webview address in browser

$
0
0

I want to create a button that opens the current web view address in browser. Following is my code. Please let me know the issue

var self =Ti.UI.createWindow({
title:'Google'
]);
 
var webview = Ti.UI.createWebView({
url:'https://www.google.ca'
});
 
self.add(webview);
 
 
var open = Ti.UI.createButton({
    height:40,
    width:'auto',
    title:'Browser',
    top:'50%'
});
 
open.addEventListener('click', function(e){
            Titanium.Platform.openURL(What do i put here);
        });
 
self.add(open);
 
self.open();

Viewing all articles
Browse latest Browse all 680

Trending Articles



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