]> iEval git - gruntmaster-page.git/blame - js/90-form.js
Remove smap attributes
[gruntmaster-page.git] / js / 90-form.js
CommitLineData
eef56f7a
MG
1(function(){
2 'use strict';
3
4 $( document ).ready(function(){
5 $('.jsform').on('click', 'input[type="submit"]', function(e){
6 var form_data = new FormData(this.parentElement);
7 var form = $(this).parent();
8 var xhr = new XMLHttpRequest();
9 xhr.open(form.attr('method'), form.attr('action'));
10 xhr.onload = function() {
11 $('#result').html(this.responseText);
12 };
13 xhr.onerror = function() {
14 $('#result').html('Error!');
15 };
1e40e2d9 16 window.scrollTo(0, 0);
eef56f7a
MG
17 $('#result').html('Loading...');
18 xhr.send(form_data);
19 return false;
20 });
21 });
22})();
This page took 0.042255 seconds and 4 git commands to generate.