Click here to Skip to main content
15,882,114 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
JavaScript
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
    function ShowProgress() {
        setTimeout(function () {
            var modal = $('<div />');
            modal.addClass("modal");
            $('body').append(modal);
            var loading = $(".loading");
            loading.show();
            var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
            var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
            loading.css({ top: top, left: left });
        }, 200);

  
    }

    $('form').live("submit", function () {
        ShowProgress();
    });

   
    
    function ShowProgress() {
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(hideMethod);
    }


    function hideMethod() {
        $('#loading').hide();
    }



When click the export button popup will open in that popup open and save button is there.

When i click the open button progress bar will appear and then excel file will open

And close that excel file in background that progress bar is showing

For hiding the progress bar in background i written code as follows


C#
function ShowProgress() {
       var prm = Sys.WebForms.PageRequestManager.getInstance();
       prm.add_endRequest(hideMethod);
   }


   function hideMethod() {
       $('#loading').hide();
   }


When i write the above code then when i execute and run at the time of click the open button in popup, that progress bar is not showing

for that how can i do.

i want after closing that excel in background the progress bar will not be shown

at the time of click the open button in popup progress bar will be displayed

for that how can i do in asp.net

What I have tried:

i want to hide the progress bar in background but it is still running
Posted
Updated 5-May-16 18:57pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900