Here is what I'm trying to do....
function myFunction()
{
var x=jConfirm('Can you confirm this?', 'Confirmation Dialog', function (r) {
y=r;
alert(y);
});
alert(x);
}
Why does alert(x) runs first(I'm beginner in javascript) and it alerts "undefined", and after I press Ok it alerts "True", and "False" when I press Cancel..?
Is there any way I can make jConfirm return true or false...ie x to be trur or false?
I'm using the "http://abeautifulsite.net/" plugin for jConfirm.