Loading ...
Sorry, an error occurred while loading the content.
 

Re: HandleSorting getting called but there is no get request passed to server

Expand Messages
  • kittumani
    Here is what I find why the request is not getting to the server. I am not calling YAHOO.example.XHR_JSON in the handleSorting method.... so i added the
    Message 1 of 2 , Feb 8, 2009
      Here is what I find why the request is not getting to the server.
      I am not calling YAHOO.example.XHR_JSON in the handleSorting method....

      so i added the function pointer to the handleSorting like

      var handleSorting = function (oColumn) {
      var sDir = "asc";
      if(oColumn.key === this.get("sortedBy").key) {
      sDir = (this.get("sortedBy").dir.indexOf("yui-dt-") !== -1) ? "desc" : "asc";
      }
      YAHOO.example.XHR_JSON();
      };

      it is called by myDataTable.sortColumn ...


      But YAHOO.example.XHR_JSON() called from handleSorting is not getting called ..
      Is this because the function withing the body eventhandler cannot be called like this..

      I tried initiazling var that = this; after the function declaration
      YAHOO.example.XHR_JSON = function () {.....


      then calling "that" as a final call in the handleSorting method, no server request generated

      Can someone throw some light on calling YAHOO.example.XHR_JSON within handleSorting
      method ...
    Your message has been successfully submitted and would be delivered to recipients shortly.