Pass parameter to Ajax call to use after response returns

Let’s say I have some data I want to pass along with an ajax call to use when the response comes in. You can pass round trip parameters in your jQuery ajax call by adding them to the options object like this

 url: '',
 dataType: "json",
 roundTripVariable: 'Weeeeee!',
 success: function(data, textStatus, jqXHR) {
 // will print 'Weeeeee!' to the console
 console.log( this.roundTripVariable );

Delete a row in google spreadsheets based on value of cell

I used the following google spreadsheet script to remove a bunch of rows that had a set value:

 * Deletes rows in the active spreadsheet that contain 'Yes' in column A
 * For more information on using the Spreadsheet API, see
function readRows() {
 var sheet = SpreadsheetApp.getActiveSheet();
 var rows = sheet.getDataRange();
 var numRows = rows.getNumRows();
 var values = rows.getValues();

 var rowsDeleted = 0;
 for (var i = 0; i <= numRows - 1; i++) {
 var row = values[i];
 if (row[0] == 'Yes') {
 sheet.deleteRow((parseInt(i)+1) - rowsDeleted);

 * Adds a custom menu to the active spreadsheet, containing a single menu item
 * for invoking the readRows() function specified above.
 * The onOpen() function, when defined, is automatically invoked whenever the
 * spreadsheet is opened.
 * For more information on using the Spreadsheet API, see
function onOpen() {
 var sheet = SpreadsheetApp.getActiveSpreadsheet();
 var entries = [{
 name : "Remove rows where column A is 'True'",
 functionName : "readRows"
 sheet.addMenu("Script Center Menu", entries);