What is the best/easiest way to post form data from my HTML page to my GAS script?
$(document).ready(function() {
$.getJSON(SCRIPT_URL+"?callback=?", { method:"addRow"}, function (data) { alert(JSON.stringify(data)); });
});
What is the best/easiest way to post form data from my HTML page to my GAS script?
$(document).ready(function() {
$.getJSON(SCRIPT_URL+"?callback=?", { method:"addRow"}, function (data) { alert(JSON.stringify(data)); });
});
If you are using Apps Script HTML Service, you can use google.script.run
.
Google Documentation - Client-side API - call server-side Apps Script functions
From a app or site outside of Google, make an HTTP Request to the Apps Script URL.