Skip to content Skip to sidebar Skip to footer

How To Get Current Url In Innapp Browser In Phonegap 3.0

Hi i cannot able to retrieve current url of inapp browser while click close button (OR at any time after loading some url) , my code given bellow var ref = window.open('http://go

Solution 1:

According to PhoneGap's documentation here http://docs.phonegap.com/en/2.3.0/cordova_inappbrowser_inappbrowser.md.html you should be able to get the url like this:

ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });

I don't believe you can access the url from the exit event but you could store it in a global variable during the loadstop event then view it in the exit event.

Post a Comment for "How To Get Current Url In Innapp Browser In Phonegap 3.0"