Skip to content

Commit

Permalink
remove maiiler
Browse files Browse the repository at this point in the history
  • Loading branch information
fahdilahady committed Oct 2, 2024
1 parent f60366d commit 4bafdb4
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,44 +137,44 @@
/* contact form
------------------------------------------------------*/

$('form#contactForm button.submit').click(function() {

$('#image-loader').fadeIn();

var contactName = $('#contactForm #contactName').val();
var contactEmail = $('#contactForm #contactEmail').val();
var contactSubject = $('#contactForm #contactSubject').val();
var contactMessage = $('#contactForm #contactMessage').val();

var data = 'contactName=' + contactName + '&contactEmail=' + contactEmail +
'&contactSubject=' + contactSubject + '&contactMessage=' + contactMessage;

$.ajax({

type: "POST",
url: "inc/sendEmail.php",
data: data,
success: function(msg) {

// Message was sent
if (msg == 'OK') {
$('#image-loader').fadeOut();
$('#message-warning').hide();
$('#contactForm').fadeOut();
$('#message-success').fadeIn();
}
// There was an error
else {
$('#image-loader').fadeOut();
$('#message-warning').html(msg);
$('#message-warning').fadeIn();
}

}

});
return false;
});
// $('form#contactForm button.submit').click(function() {

// $('#image-loader').fadeIn();

// var contactName = $('#contactForm #contactName').val();
// var contactEmail = $('#contactForm #contactEmail').val();
// var contactSubject = $('#contactForm #contactSubject').val();
// var contactMessage = $('#contactForm #contactMessage').val();

// var data = 'contactName=' + contactName + '&contactEmail=' + contactEmail +
// '&contactSubject=' + contactSubject + '&contactMessage=' + contactMessage;

// $.ajax({

// type: "POST",
// url: "inc/sendEmail.php",
// data: data,
// success: function(msg) {

// // Message was sent
// if (msg == 'OK') {
// $('#image-loader').fadeOut();
// $('#message-warning').hide();
// $('#contactForm').fadeOut();
// $('#message-success').fadeIn();
// }
// // There was an error
// else {
// $('#image-loader').fadeOut();
// $('#message-warning').html(msg);
// $('#message-warning').fadeIn();
// }

// }

// });
// return false;
// });


});
Expand Down

0 comments on commit 4bafdb4

Please sign in to comment.