How to show "load" screen with modal bootstrap on any process from server c #

1

I need my pages to show the entire server process a screen with a Loading type using the bootstrap modal I created below. My problem is being able to show this in every process.

  • Is there any way to do this?
  • Does anyone have an idea?

My code:

<div class="container">
                <div class="modal fade bs-example-modal-sm" id="modalProcessando" tabindex="-1"
                    role="dialog" aria-hidden="true" data-backdrop="static">
                    <div class="modal-dialog modal-sm">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h4 class="modal-title">
                                    <span class="glyphicon glyphicon-time">
                                    </span>&nbsp;Aguarde
                                    </h4>
                            </div>
                            <div class="modal-body">
                                <div class="progress">
                                    <div class="progress-bar progress-bar-info
                                    progress-bar-striped active"
                                    style="width: 100%">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    
asked by anonymous 12.04.2016 / 19:09

1 answer

1

You can do this for all of your application's ajax, using global .

Example:

$(document).ajaxSend(function () {
    ///chama seu processando
});

$(document).ajaxComplete(function () {
    //finaliza seu processando
});

You can also use .ajaxError() to create a global error handling, as I explained here > .

    
12.04.2016 / 19:42