Of course it's possible to organize this on a case by case basis but it is frequently needed at the early stages of code testing, so I could do with a nice simple way to put a quick and dirty solution up, even if I later replace it later with more considered design.
What I've ended up doing is creating a reasonable facsimile of a dialog, which can be called by placing a file ask.js into the Misc folder beside the main code.
I then load that using:
  app.LoadScript("Misc/ask.js");
The question is asked using the format:
  ask("Enter your first name","Steve")
Where the second parameter is an optional default value.
If the default is to be cleared between uses of the dialog, I set it to ""
The answer is return in something similar to an OnTouch handler
function askAnswer( ans ){
  alert( ans )
}
I have a simple demo spk called mydialogThe file Misc/ask.js looks like this: