Good afternoon! There is an asp.net mvc application for executing stored procedures from the database. Those. the user enters the props, clicks submit, and after the page refreshes, gets the results. Some storage times take a long time (5-8 minutes). All this time, the page is being updated, i.e. the request was sent, but the page hangs and waits for the completion of execution and then refreshes. How to hang some indicator for this period of time (it's easier to rotate a circle in the center of the screen) I would be very grateful for examples in JS.

  • Answer # 1

    Come onI look forin Googleper you...

    Thank you. I googled something, but did not find any interesting options.

    Jembo_by2021-03-11 23:40:28
  • Answer # 2

    This is a script. which will trigger the icon on ajax execution

    $ ("body"). on ({ajaxStart: function () {$ (this) .addClass ("loading");}, ajaxStop: function () {$ (this) .removeClass (" loading ");}});

    You prescribe in styles

        overflow: hidden;
        body.loading .modal
            display: block;

    and in the markup add

    div class= "modal" >
    /div >