JavaScript How to catch all postbacks on page using jquery/javascript?

I am new to web development and working on web project. In web project I want to show the Loader image on the postback of the page irrespective of the which control caused the postback.

Currently I have wrote one javascript method which shows the loader image pop up. And I have to set each controls OnClientClick= mypopupmethod() event. And I have lots of pages and controls which are causing the postbacks. So it just seems wrong to do all this way. Is there any way I can catch all the postback calls on page. I tried to tweak the '__doPostback' but I was not able to get to work.

So what I want is way to catch all the postback event on page or complete application by single method. and just call my mypopupmethod() in there. I am not expecting to get exact code but if any one could just point me in right direction should be enough.

In case of any confusion please feel free to comment.

Answer:1

I see that a lot of projects, e.g., video.js, are now using Grunt.js to build source files. My problem is that when I git clone a project into my repo, run grunt, and then git add/commit/push some ...

I see that a lot of projects, e.g., video.js, are now using Grunt.js to build source files. My problem is that when I git clone a project into my repo, run grunt, and then git add/commit/push some ...

When I add this code to my application.js it doesn't work properly. I displays 2 more 'custom_text' button and it keeps there the original 'back' button. $(document).foundation() ....

When I add this code to my application.js it doesn't work properly. I displays 2 more 'custom_text' button and it keeps there the original 'back' button. $(document).foundation() ....

  1. custom back button text
  2. swift custom back button text

In my jQuery program, I have 3 textboxes. One for net weight, one for rate and the last readonly text box for amount. The amount textbox calculates the product of the rate and the netweight textboxes ...

In my jQuery program, I have 3 textboxes. One for net weight, one for rate and the last readonly text box for amount. The amount textbox calculates the product of the rate and the netweight textboxes ...

Ok, I am bugging on this for 2nd day already, and it should be really simple... but it's not working. I am trying to load a video in a separate div, when a link from a nested list (in another div) ...

Ok, I am bugging on this for 2nd day already, and it should be really simple... but it's not working. I am trying to load a video in a separate div, when a link from a nested list (in another div) ...