mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added contact-form
This commit is contained in:
@@ -166,6 +166,24 @@ var Helper = {
|
||||
|
||||
rgbToHex: function(r, g, b) {
|
||||
return "#" + Helper.componentToHex(r) + Helper.componentToHex(g) + Helper.componentToHex(b);
|
||||
},
|
||||
|
||||
send_mail: function(from, message){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {from: from, message: message},
|
||||
url: "/php/mail.php",
|
||||
success: function(data){
|
||||
if(data == "success"){
|
||||
$("#contact-container").empty();
|
||||
$("#contact-container").html("Mail has been sent, we'll be back with you shortly.")
|
||||
}else{
|
||||
$("#contact-container").empty();
|
||||
$("#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'>contact@zoff.no</a>")
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user