I'm trying to use this:
$('#delete').live('click',function(){
var result;
bootbox.confirm("Are you sure?", function(response){
result=response;
});
alert(result);
return result;
});
But when the button is clicked:
Alert is shown first and only after that bootbox shows confirm dialog.
I want to return the response , but if i do it from within call back it doesn't work because it returns response from callback but not $('#devicedelete').live('click',function(){});
Btw i'm trying to submit a form basing on response. So if i return 'true' form will be submitted, else if it returns 'false', form wont be submitted.
Please check this: http://pastebin.com/9H3mxE9Y
I have one big table with checkboxes for each row, users select checkboxes and click on any of the buttons 'delete' , 'copy' etc and form should be submitted.
Thanks