Samuel VERMEULEN 2 years ago
parent
commit
1e39f2476a
  1. 8
      js/contact_me.js

8
js/contact_me.js

@ -10,7 +10,7 @@ $(function() {
// get values from FORM
var name = $("input#name").val();
var email = $("input#email").val();
var phone = $("input#phone").val();
// var phone = $("input#phone").val();
var message = $("textarea#message").val();
var firstName = name; // For Success/Failure Message
// Check for white space in name for Success/Fail message
@ -24,7 +24,7 @@ $(function() {
type: "POST",
data: {
name: name,
phone: phone,
// phone: phone,
email: email,
message: message
},
@ -35,7 +35,7 @@ $(function() {
$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
.append("</button>");
$('#success > .alert-success')
.append("<strong>Your message has been sent. </strong>");
.append("<strong>Message envoyé !</strong>");
$('#success > .alert-success')
.append('</div>');
//clear all fields
@ -46,7 +46,7 @@ $(function() {
$('#success').html("<div class='alert alert-danger'>");
$('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
.append("</button>");
$('#success > .alert-danger').append($("<strong>").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"));
$('#success > .alert-danger').append($("<strong>").text("Oups " + firstName + ", Message non-envoyé. Merci de réessayer plus tard !"));
$('#success > .alert-danger').append('</div>');
//clear all fields
$('#contactForm').trigger("reset");