Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Firefox在extjs 2.2 JsonStore中抛出错误_Javascript_Json_Firefox_Extjs_Firebug - Fatal编程技术网

Javascript Firefox在extjs 2.2 JsonStore中抛出错误

Javascript Firefox在extjs 2.2 JsonStore中抛出错误,javascript,json,firefox,extjs,firebug,Javascript,Json,Firefox,Extjs,Firebug,我遇到了一个问题,从服务器返回的某些值将在firebug中抛出代码12,并在extjs中导致一条浮动加载消息,该消息似乎永远不会消失,挂起我的页面。这个问题只发生在firefox中。我发现,我可以通过在GridPanel中的一个值中添加&来一致地复制问题,但其他值(如富文本格式)有时也会抛出代码12。我发现,如果我进入opera中的页面,我可以修复网格面板中的数据并将其保存到服务器。然后刷新firefox页面,一切都回到原来的样子。我是否可以在这些值周围放置一些分隔符或其他东西来防止这种情况发生

我遇到了一个问题,从服务器返回的某些值将在firebug中抛出代码12,并在extjs中导致一条浮动加载消息,该消息似乎永远不会消失,挂起我的页面。这个问题只发生在firefox中。我发现,我可以通过在GridPanel中的一个值中添加&来一致地复制问题,但其他值(如富文本格式)有时也会抛出代码12。我发现,如果我进入opera中的页面,我可以修复网格面板中的数据并将其保存到服务器。然后刷新firefox页面,一切都回到原来的样子。我是否可以在这些值周围放置一些分隔符或其他东西来防止这种情况发生?我知道extjs可以让我保存一些东西到服务器上,我不明白取回它怎么会引起问题

在firebug中:

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,
});

您的“&”直接放在HTML中,您需要HTML转义您的内容。

我在面板中键入时看到显示错误,因此要求用户自己转义内容是不实际的。这就是为什么您需要自己转义内容!