How to write a confirm dialog in javascript with custom choices?
Instead of just "Ok" and "Cancel", I would like to have for example "This" "That" and "Other".
How to write a confirm dialog in javascript with custom choices?
Instead of just "Ok" and "Cancel", I would like to have for example "This" "That" and "Other".
You could ask the user for an answer using:
You could loop that sentence until the user enters an answer within the valid ones.
In short, you can't.
You might want to consider looking into using something like a jQuery UI dialog instead.
You can't. Use some javascript UI (jQuery UI, YUI, Mootools) library and mimic a dialog you need.