var $form = $('form#test-form'), url = 'https://script.google.com/macros/s/AKfycbxd1cjNdAKcWIsZZItZvR2gLiF5z9IyeP9BmkAxBwCZ71RmocCU/exec' $('#submit-form').on('click', function(e) { e.preventDefault(); var jqxhr = $.ajax({ url: url, method: "GET", dataType: "json", data: $form.serializeObject() }).success( // do something ); })