Made it so the popup from sending a mail closes after some time

This commit is contained in:
Kasper Rynning-Tønnesen
2016-02-22 15:09:49 +01:00
parent fb9cf776b0
commit 5a4cf97008
5 changed files with 7 additions and 8 deletions

View File

@@ -206,10 +206,9 @@ var Helper = {
var from = $("#contact-form-from").val();
var message = $("#contact-form-message").val();
$("#contact-container").empty();
window.open("mailto:contact@zoff.no?Subject=Contact%20Zoff&Body=" + message, "_blank");
newWindow = window.open("mailto:contact@zoff.no?Subject=Contact%20Zoff&Body=" + message, "_blank");
$("#contact-container").html("Something went wrong, sorry about that. You could instead try with your own mail-client: <a title='Open in client' href='mailto:contact@zoff.no?Subject=Contact%20Zoff&Body=" + message + "'>contact@zoff.no</a>");
setTimeout(function(){newWindow.close()},500);
}
}