Extjs4 在Extjs 4中从服务器填充combobox中的数据
我得到了这个错误 未捕获的TypeError:无法调用未定义的方法“indexOf”Extjs4 在Extjs 4中从服务器填充combobox中的数据,extjs4,Extjs4,我得到了这个错误 未捕获的TypeError:无法调用未定义的方法“indexOf” var infost = Ext.create('Ext.data.JsonStore', { itemId:'infostore', autoLoad:true, fields:['Name','Address','Trade'], Pro
var infost = Ext.create('Ext.data.JsonStore', {
itemId:'infostore',
autoLoad:true,
fields:['Name','Address','Trade'],
Proxy:{
type:'Ajax',
url:'mera.json',
actionMethods: {
read: 'POST'
},
reader:{
type : 'json',
root:'data',
totalProperty:'total',
record:'stu'
}
}
});
代理不应该大写hanks@existdisle进行更正,但如果您能提供帮助,我仍然有两个错误。1.未捕获类型错误:无法读取未定义2.GET的属性“isProxy”file:///C:/ext-4.2.1.883/First/Extjs/proxy/Ajax.js?_dc=1394789988766 net::ERR_FILE_NOT_FOUNDXMLHttpRequest无法加载file:///C:/ext-4.2.1.883/First/Extjs/mera.json?_dc=1394791669919&query=&page=1&start=0&limit=25。请求的资源上不存在“Access Control Allow Origin”标头。因此不允许访问Origin'null'。我认为您的
类型:'Ajax'
也不应该大写,这将消除您的第一个和第二个问题。下一个看起来像是在本地加载数据。。。此应用程序是否在服务器上运行?