Skip to content

Commit

Permalink
update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mah-shamim committed Jul 31, 2024
1 parent 186ed2b commit 0342071
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
$(document).ready(function() {
$('#contactForm').on('submit', function(event) {
event.preventDefault();
alert($(this).serialize());

$.ajax({
url: 'process_form.php',
type: 'POST',
data: $(this).serialize(),
success: function(response) {
alert('Message sent successfully!');
//$('#contactForm')[0].reset();
$('#contactForm')[0].reset();
},
error: function(xhr, status, error) {
alert('An error occurred: ' + error);
Expand Down

0 comments on commit 0342071

Please sign in to comment.