Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How to get ModalPopup Request is competed ???

$
0
0

Hi Everyone !!!!

I have one submit button on ModalPopup, clicking it downloads the pdf file 

So what I have to do is to display the Loader on the page when the button is clicked once the pdf is download remove the loader trying to achieve this in Javascritp. 

found one thread its not working for me.

https://forums.asp.net/t/1127967.aspx?ModalPopup+with+Ajax+Request

I found this solution

<script>
  var isAysyncCallback = false;

  Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
  Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(methodRun);


  function beginRequest(sender, args) 
  {
    isAysyncCallback = true;
  }

  function methodRun(sender, args) 
  {
    if (isAysyncCallback) 
    {
        //code in here only runs on the completion of a updatepanel update (and maybe an ajax call via the script manager too - not sure about that one)
    }
    
    //code in here will run BOTH on page load AND on the completion of a updatepanel update (and maybe an ajax call via the script manager too - not sure about that one)
  }
</script>

where do I need to Add this code 

its giving error 

Uncaught TypeError: Cannot read property 'getInstance' of undefined

in browser Console


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>