Sample generic bootstrap user confirmation box



Here is the sample bootstrap user confirmation box,

HTML CODE:

<div id="modalConfirmClose" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button"
                        class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 id="lblTitleConfirmClose" class="modal-title">Confirmation</h4>
            </div>
            <div class="modal-body">
                <p id="lblMsgConfirmClose"></p>
            </div>
            <div class="modal-footer">
                <button id="btnNoConfirmClose" type="button" class="btn btn-default">Close</button>
            </div>
        </div>
    </div>
</div>

SCRIPT:


//generic bootstrap user confirmation box
function AsyncConfirmNo(title, msg, noFn) {
   var $confirm = $("#modalConfirmClose");
   $confirm.modal('show');
   $("#lblTitleConfirmClose").html(title);
   $("#lblMsgConfirmClose").html(msg);
   $("#btnNoConfirmClose").off('click').click(function () {
   if (noFn && noFn != '') {
   noFn();
   }
   $confirm.modal("hide");
 });
}

 

Labels: bootstrap user confirmation box, user confirmation box, bootstrap confirmation box, dynamic user confirmation box



Subscribe

Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker