Skip to content

Instantly share code, notes, and snippets.

@dimcoderx
Forked from davidmccoy/google_script_form_ajax.js
Created September 11, 2017 11:50
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 dimcoderx/3fa1bdd1dfe1fa7d248d3a76c8002079 to your computer and use it in GitHub Desktop.
Save dimcoderx/3fa1bdd1dfe1fa7d248d3a76c8002079 to your computer and use it in GitHub Desktop.
var $form = $('form#test-form'),
url = 'https://script.google.com/macros/s/abcdefghijklmnopqrstuvwxyz1234567890/exec'
$('#submit-form').on('click', function(e) {
e.preventDefault();
var jqxhr = $.ajax({
url: url,
method: "GET",
dataType: "json",
data: $form.serializeObject()
}).success(
// do something
);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment