webview.url not updating when webview changes... Heck.
I have a webview in an iPad app that lets user browse the web. But, the url property isn't populating with internally linked pages.
    var string = html.match(/<TITLE[^>]*>[^<]*<\/TITLE[^>]*>/i).toString();
    string = string.replace(/<[^>]*>/g,'');
    return string;
}
var win1 = Titanium.UI.createWindow({  
    backgroundColor:'#000'
});
var webview = Ti.UI.createWebView({
    left:0,
    right:0,
    top:40, 
    bottom:400, 
    borderColor:'#333',
    borderWidth:'.5',
    loading: true,
    url:'http://google.com'
});
var titlebutton = Titanium.UI.createButton({
    title: 'Title & URL',
    top:10,
    left:10,
    height:20,
    width:120,
    borderWidth:0,
    font:{fontSize:11,fontFamily:'HelveticaNeue-Bold'}
});
titlebutton.addEventListener('click',function(e){
    alert(gettitle(webview.html) + '\n' + webview.url + '/');
    }
);
win1.add(titlebutton);
win1.add(webview);
win1.open();
If you click on any link and then click on the "Title & URL" Button, it should show the title and the current url. But, the url isn't the url of any internally linked pages that I click on. Heck.
What am I missing?
1 Answer
- 
				
					
Hi,
answer is here :) http://developer.appcelerator.com/question/76131/the-url-propierty-of-a-webview-didnt-change I guess.