I know this is an old topic, but I'm just discovering the Custom HTML Prompt due to a need to replace the VBA UserForm for MS Excel for Mac. I need assistance with how to dynamically provide the PopUp Menu options for the selections in my custom prompt. I believe this was the same or similar question posed by DanThomas here in this post and a couple of others but unfortunately, this post nor the others provide a clear enough answer for my extremely limited understanding of Javascript and HTML.
I've modeled my prompt after the Demo Using KM Custom HTML Prompt with AppleScript & JXA posted by JMichaelTX shown below.
where I'd like to dynamically supply a list of existing employee names whose profile is to be edited or deleted where one is to be selected from my code's prompt. I will duplicate the solution for the Employee Role to also be dynamically provided from the available roles.