我遇到一个问题,从服务器返回的某些值会在firebug中抛出“代码12”并导致在extjs中浮动的“正在加载”消息,这些消息永远不会消失,似乎挂起了我的页面。这个问题只发生在firefox中。我发现我可以通过设置“&”来一致地复制问题在GridPanel中的一个值中,但其他值(如富文本格式)有时也会抛出代码12.我发现如果我进入opera中的页面,我可以修复网格中的数据面板并将其保存到服务器。然后刷新firefox页面,一切都回到原来的样子。是否有一些分隔符或我可以围绕这些值来阻止这种情况发生?我的extjs可以让我保存到服务器的东西,我不明白如何将它恢复导致问题。
在萤火虫中:
An invalid or illegal string was specified" code: "12
[Break On This Error] (function(){var D=Ext.lib.Dom;var E=Ex...El.cache;delete El._flyweights})})();
从服务器返回的示例JSON(注意“200& 5”会导致错误,“200和5”将正常工作)
{"summaryList":[{"shot":"","seq":"200 & 5","active":9998,"tag":"","file":"","id":"137943329348950905822686689581598049837","quick_comments":"","comments":"","priority":"","asset":"","prod":"dragon","type":"","store":"","submitby":"jstratton","status":"ip","format":"","date":"2011_5_10","approval":"hofx_pm","name":"jstratton","notes":"","uri":"137943329348950905822686689581598049837","dept":"fx","time":"10 May 2011 13:56:30","order":2}], "success":true}
JSON商店和GridPanel
var summaryStore = new Ext.data.JsonStore({
url: 'summaryList',
root: 'summaryList',
baseParams : {
show: showSelect.getValue(),
dept: deptSelect.getValue(),
approval: typeSelect.getValue(),
roundDate: roundDateField.getValue(),
user: summaryUser.getValue(),
},
autoLoad: true,
fields: [],
});
var summaryGrid = new Ext.grid.GridPanel({
store: summaryStore,
columns : [],
// turn off multi-selection for now
tbar : [activeButton,
removeButton,
' ',
exportToSpreadsheetButton,
refreshButton,
],
renderTo: 'summaryTab',
autoHeight: true,
loadMask: {msg: 'Loading information. Thank you for your patience.'},
autoExpandColumn: 'comments',
autoSizeColumns: true,
ddGroup: 'summaryGridDD',
enableDragDrop: true,
viewConfig: {
forceFit: true,
},
titleCollapse : true,
collapsed: false,
stripeRows: true,
title: 'Summary',
frame: true,
});
答案 0 :(得分:0)
你的'&'直接放在HTML中,您需要HTML转义您的内容。