I\'m trying to pass some parameter to a function used as callback, how can I do that?
function tryMe (param1, param2) {
alert (param1 + \" and \" + param
//Suppose function not taking any parameter means just add the GetAlterConfirmation(function(result) {});
GetAlterConfirmation('test','messageText',function(result) {
alert(result);
}); //Function into document load or any other click event.
function GetAlterConfirmation(titleText, messageText, _callback){
bootbox.confirm({
title: titleText,
message: messageText,
buttons: {
cancel: {
label: ' Cancel'
},
confirm: {
label: ' Confirm'
}
},
callback: function (result) {
return _callback(result);
}
});