I know that you can close a window.open with window.close but is there another way. I have a popup that opens facebook connect and i want to shut the popup whenever the user con
You can use close() method of created popup that is returned by the open() method as object:
var myPopup;
$(document).ready(function(){
$('#signin_menu a').click(function (){
myPopup = window.open(
$('#signin_menu a').attr("href"),
'mywindow',
'width=850,height=400');
return false;
});
})
To close do the following:
myPopup.close();
you can use the below
window.close();