In google sheet i created a custom button and assigned script function showPopup
so when i click this button it runs below code and opens a Index.html.
function showPopup(){
let messagehtml =HtmlService.createHtmlOutputFromFile("index")
SpreadsheetApp.getUi()
.showModalDialog(messagehtml , "")
But how to make it open few other html files based on the drop down list by clicking the same button with showPopup
function.
Ex. in A5 cell i created a dropdown list Sample 1, Sample 2, Sample 3
So if i select Sample 2
in A5
and if i click same button it should open Index2
html file in popup.
again if i select Sample 3
in A5
and if i click same button it should open Index3
html file in popup