function submitScheduleCallRequest() { var $form = $('form#scheduleCallForm'), url = 'https://script.google.com/a/personalleadership.com/macros/s/AKfycbw_CyLz_vqAGOAA13VHwJuBn3yqG0CSvGpUwrzWpnxA6alkVDs/exec' $(scheduleCallSubmitBtn).on('click', function(e) { e.preventDefault(); var jqxhr = $.ajax({ url: url, method: "POST", dataType: "json", data: $form.serialize() }) .done(function (e) { console.log('Done!'); }) .error(function (e) { console.log('Error: ' . e); }) .always(function () { console.log('Always!'); }); }) }