I'm trying to use the jQuery alerts dialog library from http://abeautifulsite.net/notebook/87 instead of the default alerts (which look pretty awful in my opinion). This seems to be a great library, but there is not an example of how to use the jConfirm library.
I need to do something like this:
function confirm() {
var result = false;
var response = false;
jConfirm('are you sure?', 'Confirmation Dialog',
function(r) {
result = r;
response = true;
return r;
});
if (response == true) {
alert(result);
return result;
}
else {
//wait for response
alert('hi');
}
}
and my call from my .net button:
I've posted a comment on the plugin's website (just this morning) and did Google searches for javascript and waiting for a callback to complete with no results.
Any ideas on how to use the callback correctly to get the result, before the rest of the javascript executes?
Thanks.