Sub ABMComp_Refresh(Passed_page As ABMPage, Passed_Instance_Name As String)
Private script_str As String = $"
...
// Populate the select with the names
for (let i = 1; i <= nonames; i++) {
const option = document.createElement('option');
//In following 2 statements backticks (`) are used for template
//literals (also known as template strings) in JavaScript.
//Template literals allow you to embed expressions within a string
//using string1 syntax
option.value = eval(string2);
option.textContent = eval(string2);
selectName.appendChild(option);
}
...
"$
script_str = script_str.Replace("string1", "`${}`")
script_str = script_str.Replace("string2", "`name${i}`")
Parent_Page.ws.Eval(script_str, Array As Object(Passed_Instance_Name))
End Sub