0
爲什麼我在填充我的雅虎表時得到兩次分頁?我在填寫之前刪除我的雅虎表。我只想告訴你,表格中填充了正確的數據。爲什麼我在填充我的雅虎表時得到兩次分頁
var MedicalFilesTable = document.getElementById('MedicalFilesTable');
if(MedicalFilesTable.hasChildNodes())
{
while(MedicalFilesTable.childNodes.length >= 1)
{
MedicalFilesTable.removeChild(MedicalFilesTable.firstChild);
}
}
YAHOO.example.MedicalFilesTable = function()
{
var MyColumnDefs = [
{key:"eventid", label: "Event Id",sortable:true,formatter: YAHOO.widget.DataTable.formatAxsOppLink},
{key:"PartOfAMulti", label: "Multi?",sortable:true,formatter: YAHOO.widget.DataTable.formatAxsOppLink}
];
var MyDataSource = new YAHOO.util.DataSource(gMedicalFilesArray);
MyDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
MyDataSource.responseSchema = {fields: ["eventid","PartOfAMulti"]};
var MyConfigs = {paginator : new YAHOO.widget.Paginator({rowsPerPage: 10})};
var MyDataTable = new YAHOO.widget.DataTable("MedicalFilesTable", MyColumnDefs, MyDataSource,MyConfigs);
return {oDS: MyDataSource, oDT: MyDataTable};
}();
這是在生成的HTML的子節點。整個事情在FireFox中工作,但不在IE中。當我繼續多次點擊鏈接時,分頁只顯示兩次。 – 2011-03-31 19:46:31
嘗試重置分頁程序對象..例如 var MyConfigs = {}; MyConfigs = {paginator:new YAHOO.widget.Paginator({rowsPerPage:10})}; – danniel 2011-04-01 17:57:00
我試過了,但沒有奏效。仍然得到兩次分頁。 – 2011-04-01 18:03:18