I want to close a window automatically after 5 seconds using jQuery. This is what i tried but not working.
function SubmitDesignRequestForm() {
var frm = $("#frmDesignRequestForm").serialize();
$.post("/Admin/SaveDesignRequestForm", frm, function(data) {
Notify("Success", "Saved Successfully");
setTimeout(function() {
window.close();
}, 500);
});
});
}
But above function just show message but do not close windows.
setTimeout(function() {
Notify("Success", "Saved Successfully");
window.close();
}, 5000);
From above function "Saved Successfully" pops up but window does not close.
Please guide!