In Google Apps Script - I set the title using the doGet as below.
Google Apps script .gs
function doGet(e) {
return HtmlService.createHtmlOutputFromFile('BFform.html')
.setTitle("This is MYTITLE");
}
function ChangeTitle() {
var Changed = HtmlService.createHtmlOutputFromFile('BFform.html');
Changed.setTitle("New Title");
}
I now need to change the title when a button is clicked
On the HTML file on click of a button I have as below
function CallChangeTitle(){
google.script.run.ChangeTitle();
}
However the Title is not changing
You can do it using the method setTitle(String). The linked documentation describes its usage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With