Hey all, hope you will be able to help me..
I have a problem with my html, I would like to do a menu which does a function if I click on the buttons. For the moment i did it:
My html code:
</html>
<body>
<input type="button" value="a" onclick="a()"> <p></p>
<span class="annuler" onclick="google.script.host.close()">Annuler</span>
<script>
function a() {
var ss = SpreadsheetApp.openById('xxxxxxxxxx');;
var sheet = ss.getActiveSheet();
sheet.getRange('G6:BD405').clearContent();
}
</script>
</body>
</html>
And my script is:
const html = HtmlService.createHtmlOutputFromFile('form')
.setWidth(300)
.setHeight(485);
SpreadsheetApp.getUi().showModalDialog(html, 'Boîte à outils');
}
What I would like to is when I click on the a button, the fonction a() works, but at the moment, when I press the a button, it does nothing, only the "annuler" button is working and I do not know why. Can someone help me? :)
Thanks a lot! :)