to be clear about the javascript frontend....
when i sat down to do this, the rule was that it had to be self-contained. so, i didn't want to have any *.js files - i wanted everything to be hardcoded into the html. i also didn't want to call any external routines or force the user to have to go online to connect to any websites. i don't want to use any servers at all. this should work when the user is disconnected from the internet altogether. so these are the parameters i'm working with, and i'm not interested in trying to work around them. i didn't even want to use javascript at all, but it's easy enough for the basic script...
i'm able to get all the information i need from the built-in commands, but i can't get the object to load without explicit user input. or, at least, i can't find the right listener. so, the script knows where the file is. it knows how to load it. but, it won't actually load it unless the user clicks something.
what i want the script to do, though, is figure out which file the player needs to load when the user clicks. so, the script has to do something before i get any user input. and, none of the listeners i've tried up to this point want to let me do that - they all get the right pointers in place, and then wait for the user to click.
so, is this possible? well, security risks aside, it's a pretty basic level of functionality. i'm used to programming with an actual compiler; i have minimal experience scripting anything at all. but, if javascript can't do something this simple without calling a bunch of libraries, it's kind of useless, isn't it?
if i conclude, after trying a few more things, that i can't do what i want, then i'll have to prompt the user to tell me what file type they bought. and, you can blame the awkwardness of it on the language.