Google apps script le.script.run.withSuccessHandler(updateButton).testerr(formObject)(不需要故障处理程序)。我只是添加了失败处理程序,试图找出问题所在!还是不行。事实上,一旦我能让这件事开始工作,我只想做go

Google apps script le.script.run.withSuccessHandler(updateButton).testerr(formObject)(不需要故障处理程序)。我只是添加了失败处理程序,试图找出问题所在!还是不行。事实上,一旦我能让这件事开始工作,我只想做go,google-apps-script,google-sheets,file-upload,web-applications,server-error,Google Apps Script,Google Sheets,File Upload,Web Applications,Server Error,le.script.run.withSuccessHandler(updateButton).testerr(formObject)(不需要故障处理程序)。我只是添加了失败处理程序,试图找出问题所在!还是不行。事实上,一旦我能让这件事开始工作,我只想做google.script.run.withSuccessHandler(updateButton).testerr(formObject)(不需要失败处理程序)。我只是添加了失败处理程序,试图找出问题所在!应该有链接吗?应该有链接吗? /**


le.script.run.withSuccessHandler(updateButton).testerr(formObject)(不需要故障处理程序)。我只是添加了失败处理程序,试图找出问题所在!还是不行。事实上,一旦我能让这件事开始工作,我只想做
google.script.run.withSuccessHandler(updateButton).testerr(formObject)
(不需要失败处理程序)。我只是添加了失败处理程序,试图找出问题所在!应该有链接吗?应该有链接吗?
/**   @OnlyCurrentDoc   */
// When the Sheet is opened, add the menu and create an item in the menu *** WORKING
function onOpen() {
  SpreadsheetApp.getUi()
      .createMenu('Menu')
      .addItem('Send Confirmation Email', 'createSideBar')
      .addToUi();
}


// Creates the side bar from the Index.html file and displays it *** WORKING
function createSideBar() {
  var form = HtmlService.createTemplateFromFile('Index').evaluate().setTitle('Send Confirmation Email');
  SpreadsheetApp.getUi().showSidebar(form);
}


// Test function where I make a request to my site *** NOT WORKING
function testerr(formObject) {
  UrlFetchApp.fetch('https://webhook.site/...');
  return "Complete!";
}
<form id="sendEmailForm" onsubmit="handleFormSubmit(this)">

    <div class="form-group">
        <label for="row_number">Row</label>
        <input class="form-control form-control-sm" type="number" id="row_number" name="row_number" required>
    </div>

    <div class="custom-file">
        <input type="file" class="custom-file-input" id="images_input" name="images_input" multiple required>
        <label class="custom-file-label" for="images_input">Select images...</label>
    </div> 

    <button id="submit-btn" type="submit" class="btn btn-primary btn-md btn-block">Submit</button>

</form>
<script>
    // Prevent forms from submitting. *** WORKING
    function preventFormSubmit() {
        console.log('Entered preventFormSubmit()...');
        
        var forms = document.querySelectorAll('form');
        for (var i = 0; i < forms.length; i++) {
            forms[i].addEventListener('submit', function (event) {
                event.preventDefault();
            });
        }
        
        console.log('Exited preventFormSubmit()...');
    }
    window.addEventListener('load', preventFormSubmit); // *** WORKING

    // *** NOT WORKING
    function handleFormSubmit(formObject) {
        console.log('Entered handleFormSubmit()...');
        
        google.script.run.withFailureHandler(updateButton).testerr(formObject);
        google.script.run.withSuccessHandler(updateButton).testerr(formObject);
        
        console.log('Exited handleFormSubmit()...');
    }

    // *** WORKING
    function updateButton(str) {
        document.getElementById('submit-btn').innerHTML = str;
    }
</script>
google.script.run.withFailureHandler(updateButton).testerr(formObject);
google.script.run.withSuccessHandler(updateButton).testerr(formObject);
google.script.run
.withFailureHandler(updateButton)
.withSuccessHandler(updateButton)
.testerr(formObject);