我遇到了一個問題,「使用IE 8停止運行此腳本,此腳本在此頁面上導致您的Web瀏覽器運行緩慢」。究竟我在嘗試執行的操作是加載大量數據庫邏輯中的行數並將其綁定到客戶端的jqgrid。停止在IE中運行此腳本通知
客戶端代碼 -
$(document).ready(function() {
var model = @Html.Raw(POSWebManager.MvcApplication.Serializer.Serialize(Model));
var boolRenderer = function(row, column, value) {
var html = "<div style='overflow: hidden; text-overflow: ellipsis; text-align: left; padding:4px 4px 2px 2px;";
if(value === true) {
if(column == "Exported") {
html += "font-weight:bold;background-color:#99FF66;";
} else if(column == "HasErrors") {
html += "font-weight:bold;background-color:#FF9999;";
}
}
html += "'>";
if(value === true) {
html += "Yes";
} else {
html += "No";
}
html += "</div>";
return html;
};
var columns = [
{ name: "ID", text: 'ID', datafield: 'ID', width: 55 },
{ name: "TransactionItemID", text: 'Trans Item ID', datafield: 'TransactionItemID' },
{ name: "Exported", text: 'Exported', datafield: 'Exported', cellsrenderer: boolRenderer },
{ name: "HasErrors", text: 'Has Errors', datafield: "HasErrors", cellsrenderer: boolRenderer },
{ name: "FirstName", text: 'First Name', datafield: 'FirstName', width: 110, type: "string" },
{ name: "LastName", text: 'Last Name', datafield: 'LastName', width: 110, type: "string" },
{ name: "DOB", text: 'DOB', datafield: 'DOB', width: 90, type: "string" },
{ name: "IDNumber", text: 'ID Number', datafield: 'IDNumber', width: 110, type: "string" },
{ name: "StreetAddress", text: 'Street Address', datafield: 'StreetAddress', width: 150, type: "string" },
{ name: "City", text: 'City', datafield: 'City', width: 130, type: "string" },
{ name: "State", text: 'State', datafield: 'State', width: 70, type: "string" },
{ name: "Post", text: 'Post', datafield: 'PostalCode', width: 70, type: "string" },
{ name: "Email", text: 'Email', datafield: 'Email', width: 150, type: "string" },
{ name: "Created", text: 'Created', datafield: 'Created', width: 90, type: "string" },
{ name: "Updated", text: 'Updated', datafield: 'Updated', width: 90, type: "string" },
{ name: "ABN", text: 'ABN Number', datafield: 'ABN', width: 100, type: "string" },
{ name: "CompanyName", text: 'Company Name', datafield: 'CompanyName', width: 100, type: "string" }
];
var adapter= new $.jqx.dataAdapter({ localdata: model, datatype: "json", datafields: columns });
$("#jqxgrid").jqxGrid({
width: 960,
source:adapter,
theme: getDemoTheme(),
pageable: true,
autoheight: true,
sortable: true,
altrows: true,
enabletooltips: true,
showfilterrow: true,
filterable: true,
columnsresize: true,
selectable: true,
pagesize: 25,
pagesizeoptions: ['25', '50', '100', '1000'],
selectionmode: 'multiplerowsextended',
columns: columns
});
});
誰能告訴我如何禁用此通知
沒有與註冊表使用或使用ActiveX。 我對jqgrid和jquery很新,所以請幫我解決這個問題。
感謝
我還沒有得到它如何做到這一點,我應該怎麼做大塊方法,以及如何在jqgrid方法中啓動processLargeArray()方法。可以請指導我 –