Reference Information. I prepared a form in the HTML service in Google script applications that I call using the DoGet function from Code.gs.
my doget function
function doGet() {
return HtmlService.createTemplateFromFile('HTMLUI').evaluate();
}
After publication, it is a simple browser form with several shortcuts, an input field, submit, reset and a search button on it. The user will enter information by clicking the "Send" button, and the data will be saved in a spreadsheet (background). “Work great here.”
Now, when the user clicks the search button, you need to fill in the pop-up window, in this pop-up window the user can enter information (from the drop-down list), and the selected record will be filled back into the input fields, which can be changed and sent again.
Question:
How can I open the POP up kind window in GAS in a browser.
my search button in the HTML service is as follows:
<div><input type="button" onclick="createPopup()" value="Find"></div>
at the end for javascript call:
<script type="text/javascript">
function createPopup() {
google.script.run.popup(document.forms[0]);
}
</script>
CreatePopup () javascript code:
function popup(form){
Logger.log("I am first called");
Logger.log("I am last called");
}
When a magazine is viewed, it shows "I am called first" and "I am called last time."
My research: I found that Spreadsheet.toast (something like this) works in a spreadsheet, but how do I get a small window in the browser.