Skip to content

Instantly share code, notes, and snippets.

@videlais
Created May 17, 2018 01:51
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 videlais/d6ed8492dbc3b795fe78a56c0ccfdb2c to your computer and use it in GitHub Desktop.
Save videlais/d6ed8492dbc3b795fe78a56c0ccfdb2c to your computer and use it in GitHub Desktop.
<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