Reputation: 1479
I am developing phonegap app where I need to open inAppBrowser (Which will display google login page).
For that I have written below code
$("#homePage").live("pageshow", function() {
$("#btnLogin").click(function() {
var ref = window.open(loginUrl, '_blank', 'location=yes');
alert(ref); // It alerts 'window onject'
ref.addEventListener('loadstart', function(event) {
alert(event.url); // This alert is not firing
});
})
});
The browser window is displaying correctly (Without address bar in iPhone). But 'loadstart' event is not firing.
I am using phonegap 2.9 and generating app by build.phonegap.com
done below configuration setting in config.xml file
<!-- ios Setting for inAppBrowser -->
<plugin name="InAppBrowser" value="CDVInAppBrowser" />
// For more info, I am using below JS files
< script type="text/javascript" charset="utf-8" src="js/phonegap-1.1.0.js" >< /script >
< script src="js/jquery-1.7.1.js" >< /script >
< script src="js/jquery.mobile-1.4.1.min.js" >< /script >
Can anybody tell why loadstart event is not firing?
Upvotes: 0
Views: 1342
Reputation: 1479
I have found the issue,
According to phonegap documentation we don't need to include the phonegap.js because during the build process, it will automatically include it. But declairation must required like
<script src="phonegap.js"></script>
Upvotes: 1