Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google apps script change Title

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

like image 500
JS Learner Avatar asked Jan 24 '26 03:01

JS Learner


1 Answers

You can do it using the method setTitle(String). The linked documentation describes its usage.

like image 63
Juan Berdah Avatar answered Jan 26 '26 19:01

Juan Berdah