c2_callFunction("name", ["param1", "param2"])
EDIT: just tried it: https://1drv.ms/u/s!AjkoCSebIn9JiXcTHqtxEm0psfjb , it shows the variable name in the prompt and sets the result of the prompt to the variable
you may have to url encode it in the function to ensure no syntax error can be done.
EDIT 2: doesn't seem to be an issue with characters in the end, so url encoding it is not needed it seems.
in any case, you have to handle the fact the player may simply cancel the prompt too.
also rojohound solution seems to be easier and faster, did not read all the way through, duh, I'm dumb.