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

need to show data in the table

Expand Messages
  • bahalul kabir
    Hi satyam or anyone plz, I need to  show data in the table. Red line below is the place. var support_dataTable = new YAHOO.widget.DataTable( dynamicdata ,
    Message 1 of 3 , Oct 30, 2009
    • 0 Attachment
      Hi satyam or anyone plz,
      I need to  show data in the table. Red line below is the place.
       
       
      var support_dataTable = new YAHOO.widget.DataTable("dynamicdata", myColumnDefs, support_datasourse, myConfigs);
       
       var btnSearch = new YAHOO.widget.Button("search");       
        btnSearch.on("click", onBtnSearch);
       
       function onBtnSearch() {           
                  var searchText = YAHOO.util.Dom.get("searchText").value;
                  var searchCriteria = YAHOO.util.Dom.get("searchCriteria").value;        
                  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);  // data is coming here
                                What should I write here to get the update table???
                              } else {
                                  alert(o.responseText);
                              }
                          },
                          failure: function (o) {
                              alert(o.statusText);
                          },
                          scope:this
                      }
                  );
              }
       
       
      support_dataTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload)
          {
              oPayload.totalRecords = oResponse.meta.totalRecords;
              return oPayload;
          }
          return {
              ds: support_datasourse,
              dt: support_dataTable
          };
       
      Kabir

    • 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 2 of 3 , 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"
      • Satyam
        If you want to refersh the whole of the datatable with the new data, this function will be helpful: http://www.satyam.com.ar/yui/2.6.0/requery.html Satyam
        Message 3 of 3 , Oct 30, 2009
        • 0 Attachment
          If you want to refersh the whole of the datatable with the new data,
          this function will be helpful:

          http://www.satyam.com.ar/yui/2.6.0/requery.html

          Satyam


          bahalul kabir escribió:
          >
          >
          > Hi satyam or anyone plz,
          > I need to show data in the table. Red line below is the place.
          >
          >
          > var support_dataTable = new YAHOO.widget.DataTable("dynamicdata",
          > myColumnDefs, support_datasourse, myConfigs);
          >
          > var btnSearch = new YAHOO.widget.Button("search");
          > btnSearch.on("click", onBtnSearch);
          >
          > function onBtnSearch() {
          > var searchText = YAHOO.util.Dom.get("searchText").value;
          > var searchCriteria =
          > YAHOO.util.Dom.get("searchCriteria").value;
          >
          > 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); // data is coming here
          > What should I write here to get the update
          > table???
          > } else {
          > alert(o.responseText);
          > }
          > },
          > failure: function (o) {
          > alert(o.statusText);
          > },
          > scope:this
          > }
          > );
          > }
          >
          >
          > support_dataTable.handleDataReturnPayload = function(oRequest,
          > oResponse, oPayload)
          > {
          > oPayload.totalRecords = oResponse.meta.totalRecords;
          > return oPayload;
          > }
          > return {
          > ds: support_datasourse,
          > dt: support_dataTable
          > };
          >
          > Kabir
          >
          >
          >
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - www.avg.com
          > Version: 8.5.423 / Virus Database: 270.14.39/2468 - Release Date: 10/29/09 19:49:00
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.