use dialog confirmation as confirm dialog
Hello,
I want to use a jquery ui dialog popup for confirmation, but i can't use this like I want.
I want to do this :
- function popup() {
$("#test").dialog({
modal: true,
title: "Test",
buttons: {
"CANCEL": function() {
$("#test").dialog( "close" );
return false;
},
"OK": function() {
$("#test").dialog( "close" );
return true;
}
}
});
}
And use like this :
- if(popup()) {
- // do some stuff
- }else{
- // do some other stuff
- }
But it doesn't work.
If you have any ideas,
Thanks,
Thec