]>
iEval git - gruntmaster-page.git/blob - js/90-form.js
a30e7f4fc81f68c1aa3b25a9bebde8c04f099b90
2 const result
= q('#result');
3 $('.jsform > input[type="submit"]').on('click', e
=> {
4 const form_data
= new FormData(this.parentElement
);
5 const form
= this.parentNode
;
6 const xhr
= new XMLHttpRequest();
7 xhr
.open(form
.getAttribute('method'), form
.getAttribute('action'));
8 xhr
.onload
= () => result
.innerHTML
= this.responseText
;
9 xhr
.onerror
= () => result
.innerHTML
= 'Error!';
10 window
.scrollTo(0, 0);
11 result
.innerHTML
= 'Loading...';
This page took 0.038953 seconds and 4 git commands to generate.