Skip to content

Instantly share code, notes, and snippets.

/auth.js Secret

Created February 25, 2015 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/88b07034fe16b1444c23 to your computer and use it in GitHub Desktop.
Save anonymous/88b07034fe16b1444c23 to your computer and use it in GitHub Desktop.
/**
* Authenticate submit
*/
Authenticate.prototype.handleSubmit = function (event) {
event.preventDefault();
this.submit.setAttribute('disabled', 'true');
this.log('handleSubmit', event);
this.xhr = new XMLHttpRequest();
this.xhr.onload = (this.handleResult).bind(this);
this.xhr.open(this.form.getAttribute('method'), this.form.getAttribute('action'), true);
this.xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
this.xhr.send(new FormData(this.form));
this.displayNotice('Check creditentials.');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment