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

Re: custom function for datatable?

Expand Messages
  • juliebonniedaisy
    Read these 2 excellent articles: http://yuiblog.com/blog/2008/10/15/datatable-260-part-one/ http://yuiblog.com/blog/2008/10/27/datatable-260-part-two/ search
    Message 1 of 2 , Oct 30, 2009
    • 0 Attachment
      Read these 2 excellent articles:

      http://yuiblog.com/blog/2008/10/15/datatable-260-part-one/

      http://yuiblog.com/blog/2008/10/27/datatable-260-part-two/
      search in this 2nd one for the string "update the Recordset"

      --- In ydn-javascript@yahoogroups.com, bahalul kabir <bahar_aub@...> wrote:
      >
      > Hi satyam or anyone plz,
      > This is default function for each row in dataTable-
      > support_dataTable.subscribe("cellClickEvent",function(oArgs) {
      > } 
      >  
      > I need to make custom functin. Is that correct way to write :
      > // start custom function
      > var onBtnSearch = function(oArgs) {
      >             var searchText = YAHOO.util.Dom.get("searchText").value;
      >             var searchCriteria = YAHOO.util.Dom.get("searchCriteria").value;
      >            
      >             //alert(searchText + " - " + searchCriteria);
      >             YAHOO.util.Connect.asyncRequest("GET","index.php?show=ajax&module=support&startIndex=0&results='.$numResults.'&searchText=" + searchText +                                 "&searchCriteria="+ searchCriteria,
      >                 {
      >                     success: function (o) {
      >                         if (o.responseText) {                          
      >                            //alert(o.responseText);
      >                                 //How can update data table??
      >                            } else {
      >                             alert(o.responseText);
      >                         }
      >                     },
      >                     failure: function (o) {
      >                         alert(o.statusText);
      >                     },
      >                     scope:this
      >                 }
      >             );
      >         }
      >  var btnSearch = new YAHOO.widget.Button("search");
      >   btnSearch.on("click", onBtnSearch);
      >  
      > // finish custom function
      >  
      >  
      >  
      >  
      > support_dataTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload)
      >     {
      >         oPayload.totalRecords = oResponse.meta.totalRecords;
      >         return oPayload;
      >     }
      >     return {
      >         ds: support_datasourse,
      >         dt: support_dataTable
      >     };
      >  
      > Kabir
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.