I use jQuery Impromptu prompts in my application and they're very helpful.
However to call the Impromptu prompts you need to specify the button names and their return values like so:
$.prompt('Example 2',{ buttons: { Ok: true, Cancel: false } });
I would really like to have dynamic button names, something like this:
function showprompt(question, button1, button2) {
$.prompt(question,{ buttons: { button1: true, button2: false } });
}
But this doesn't seem to work, the buttons are just called 'button1' and 'button2'!
I've tried using eval(button1)
and ''+button1
but they bring up syntax errors.
Any suggestions?