Bootbox, Two Modal Windows - One Above Another
I have two bootbox modal windows - parent and child. If user enters wrong data and try to save the parent modal window, the child window appears. The problem is - when the child wi
Solution 1:
parent=bootbox.dialog(/*your code*/);
put following code in callback of button creating child modal
parent.find('button').prop("disabled",true);
put following code in callback of closing callback
parent.find('button').prop("disabled",false);
eg.
$('button calling child').click(function(e)
{
parent.find('button').prop("disabled",true);
bootbox.dialog(
{
main:
{
callback:function(e)
{
parent.find('button').prop("disabled",false);
}
}
});
});
Post a Comment for "Bootbox, Two Modal Windows - One Above Another"