ajax get form data
var form = // Select your form here;
var fmData = new FormData();
form.append('name',fmData);
$.ajax({
url:'URL',
type:'POST',
data:fmData,
success:function(){},
error:(er){}
})
ajax get form data
var form = // Select your form here;
var fmData = new FormData();
form.append('name',fmData);
$.ajax({
url:'URL',
type:'POST',
data:fmData,
success:function(){},
error:(er){}
})
ajax submit form data
<form id="contactForm1" action="/your_url" method="post">
<!-- Form input fields here (do not forget your name attributes). -->
</form>
<script type="text/javascript">
var frm = $('#contactForm1');
frm.submit(function (e) {
e.preventDefault();
$.ajax({
type: frm.attr('method'),
url: frm.attr('action'),
data: frm.serialize(),
success: function (data) {
console.log('Submission was successful.');
console.log(data);
},
error: function (data) {
console.log('An error occurred.');
console.log(data);
},
});
});
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us