javascript - function openDialog() set width and set height Google Spreadsheets -


i need set width of dialog in google spreadsheet.

so far code is:

// use code google docs, forms, or new sheets. function onopen() {   spreadsheetapp.getui() // or documentapp or formapp.       .createmenu('cadastro')       .additem('open', 'opendialog')       .addtoui(); }  function opendialog() {   var html = htmlservice.createhtmloutputfromfile('index');   spreadsheetapp.getui() // or documentapp or formapp.       .showmodaldialog(html, 'dialog title'); }`enter code here` 

this set height , width.

function opendialog() {   var html = htmlservice.createhtmloutputfromfile('index')   .setheight(100)   .setwidth(100);   spreadsheetapp.getui() // or documentapp or formapp   .showmodaldialog(html, 'dialog title')   }//`enter code here` 

of course need add index.html file script editor like:

hello, world! <input type="button" value="close" onclick="google.script.host.close()" /> 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -