Skip to content

Instantly share code, notes, and snippets.

@videlais
Created May 17, 2018
Embed
What would you like to do?
<script>
// Configure the data to send
var dataToSend = {
"Column 1": "Some Value",
"Column 2": "Some Other Value",
"Column 3": "Some Additional Value"
};
// Call the built-in $.ajax function as part of jQuery
// url: The URL of the web app
// method: Use the GET method
// dataType: Set the data type as JSON
// .done: call is complete and without error
// .fail: call experienced an error
$.ajax({
url: "https://script.google.com/macros/s/AKfycbxDlMvr7ZL5zdb06zA2ta7XcNsT08nIszBEmKUAfjvWCi0KvA/exec",
method: "GET",
dataType: "json",
data: dataToSend
}).done(function() {
// Do something on success
}).fail(function() {
// Optionally do something on error
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment