Close the created page on sidebar form submit

2019-08-17 02:17发布

问题:

I have a template in a side bar with a form using the html service attached to a sheet (screenshot). In my template, when I thick the submit button it activates:

        function handleFormSubmit(formObject) {

            google.script.run.processRowPopupHTML(formObject); // the output from form goes to processDocBuildHtml
            google.script.host.close();

        }

This works fine as far as sending the text in the textarea to the server side. But when this happens I get a big blank screen that looks like:

which I then have to close. Is there any way to avoid this?