Click here to Skip to main content
12,946,658 members (50,081 online)
Click here to Skip to main content
Add your own
alternative version


2 bookmarked
Posted 12 Jul 2011

JavaScript function to be called after UpdatePanel refreshes

, 16 Jul 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
A method to call a function in JavaScript after each response.

I was searching for a method to call a function in JavaScript after each response. I found a method to do this:


I also made a function to manage the loading of DOM objects.
        var $span = $(this);
             .focus(function(){ $})
             .blur(function(){ $span.hide()});

Here is the JavaScript function after UpdatePanel refreshes. In this case, the function will be called on document ready and after each DOM object is created after ASPNET Async.

$.PlanetAspNet = {
    options: [],
    PageLoadedHandler: function(sender,e){
        if (e._panelsUpdated.length==0){
    setReady: function(selector,fn){
        return $.PlanetAspNet.options;
    Ready: function(item,e){
            var o = $(item).find(this.selector);
            if (o.length>
0) this.fn(o,item,e);
        return item;

I hope this helps.


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


About the Author

United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170518.1 | Last Updated 16 Jul 2011
Article Copyright 2011 by joetavMB
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid