RSS LOGORss   Welcome Guest  Login Register
Welcome to our Blogs
Back Back
Subject


mag
2008/08/24 07:28AM
Add functions to be Executed to Load event      Number of views: 1821

This function is copied from this blog, it's a very useful one and I have used it a couple of times, so, I thought of share it with you all,

 

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

 

Here is a sample of how to call it,

addLoadEvent(

function () {OnGridFocusedRowChanged();});

 

best of luck,