I have a typical ajax post type with a success function.
I have tried in many different ways to close window on success.
But only after message is revealed and can be read.
$.ajax({
type:"POST",
url:"file.php",
data:info,
success:function(){
$('#load').empty();
$('#information').html('Thank you!');
\\setTimeout('window.close()',2000); \\
}
});
return false;
Page is opened with “window.open()”
try
you can also get reference to window: