In a javascript function, I do this for quick prototyping:
if(confirm("are you sure you want to do this")) {
// do something
} else {
// do something else
}
If I get a specific event over a websocket, I want to remove this dialog in javascript/jquery. Any ideas how to do that? Is there a DOM id or something for that? Extra-Points if not even the else-block is executed when removing the dialog 🙂
You can’t. All javascript execution is halted while a
confirm,alert, orpromptis displayed.https://developer.mozilla.org/en/DOM/window.confirm