I'm looking for a way to get response from the dialog in my function.
I have some select boxes and when adding something I use this dialog function to request some additional information.
On closing I'd like to pass back the information so I can do something on it.
I have a on.('change' function on the select, with a function like:
$('#boxx').on('change', function(e) {
...
var additionalInfo = getAdditional($(this).val());
...
});
function getAdditional(curField) {
var tDesc = '';
BootstrapDialog.show({
title: 'Additional info for ' + curField,
message: '<input type="text" id="add_info">',
buttons: [
{
label: 'Ok',
cssClass: 'btn-primary',
action: function(dialog) {
tDesc = $('#add_info').val();
dialog.close();
}
}
]
});
return tDesc;
}
But ofcourse the dialog is running async on the code.. Does anyone has any advice for me?
Hi all,
I'm looking for a way to get response from the dialog in my function. I have some select boxes and when adding something I use this dialog function to request some additional information. On closing I'd like to pass back the information so I can do something on it.
I have a on.('change' function on the select, with a function like:
But ofcourse the dialog is running async on the code.. Does anyone has any advice for me?