我正在使用带有JSONrest存储的OndemandGrid。当直接从IE访问我的xhtml页面时,网格没有加载。我收到脚本错误如下
Line : 0
Char : 0
Error : Script Error
Code : 0
URL : http://localhost:8080/sample/dgridsample.xhtml
如果我使用ctlr + F5 Grid正在加载.Below是我的javascipt代码
require([
"dgrid/OnDemandGrid",
"dojo/store/JsonRest",
"dojo/dom",
"dojo/dom-style",
"dojo/_base/declare",
"dgrid/extensions/ColumnResizer"
], function (OnDemandGrid,JsonRest,dom,domStyle,declare,ColumnResizer) {
jsonstore = new JsonRest({target: url,idProperty: "srno"});
grid = new(declare([OnDemandGrid,ColumnResizer]))({
store: jsonstore,
columns: Layout,
minRowsPerPage : 40,
maxRowsPerPage : 40,
keepScrollPosition : true,
loadingMessage: "Loading data...",
noDataMessage: "No results found."
}, "grid");
domStyle.set(dom.byId("grid"),"height","230px");
grid.startup();
});
当我发出警报时,我收到了未定义的消息框。
alert(grid); // getting undefined
domStyle.set(dom.byId("grid"),"height","230px");
注意:它在Firefox中工作正常。在IE ctrl + F5中加载网格。 有人能说出为什么它不能在IE中运行吗?