Hi all,first i would like to thank you for the great work you are done with PhoneGap!Really so useful or us, developer :-DI would ask you if i'm missing something in a scenario like this:- I open a new page in a InAppBrowser (phonegap v. 2.3.0)var ref = window.open('www.somesite.com/newPage.html', '_self', 'location=no');
- in the target page there is a button like this:<form><input type=button value="Close" onClick="javascript:window.close()" name="button"></form>=> The InAppBrowser doesn't close and neither it calls the Listener attachedref.addEventListener('exit', function(event) { alert('closed') });
Is this a bug? Is there some workaround?
Thank you so much
Denis Brighi
--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com
You can use events. See http://wiki.apache.org/cordova/InAppBrowser (Example Usage #4) and this was briefly discussed in the blog posts as well.
function onDeviceReady() {
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
ref.addEventListener('exit', function() { alert(event.type); });
}var ref = window.open('http://apache.org', '_blank', 'location=yes');
// close InAppBrowser after 5 seconds
setTimeout(function() {
ref.close();
}, 5000);--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
ref.close();$("#click_button").click(function(){ref.close();});