|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
need to show data in the tableHi 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 |
|
|
Re: need to show data in the tableRead 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" |
|
|
Re: need to show data in the tableIf 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 > > |
| Free embeddable forum powered by Nabble | Forum Help |