-
Answered: "TypeError: 'undefined' is not an object (evaluating 'records.length')" - Error
Answered: "TypeError: 'undefined' is not an object (evaluating 'records.length')" - Error
Hello Everyone..
Hope someone can help me. I am getting the following javascript error
TypeError: 'undefined' is not an object (evaluating 'records.length')
Here is the relevant code
Ext.regModel('Contact', {
fields: ['firstName', 'lastName','status','creationDate']
});
var store = new Ext.data.Store({
model: 'Contact',
//sorters: 'creationDate',
proxy: {
type: 'ajax',
url : 'userList.json',
reader: {
type: 'json',
root: 'users'
}
},
autoLoad: true
});
Here is my JSON String.
{
"users": [
{
"firstName": "Joe",
"lastName": "Blow",
"status": "Action Required",
"creationDate": "10/10/1974"
},
{
"firstName": "Bob",
"lastName": "Smithr",
"status": "Action Requsired",
"creationDate": "10/11/1974"
}
]
}
Any ideas?
-
Best Answer Posted by
AndreaCammarata
Hi.
Please be sure that you are browsing your application from "http://localhost/..." or a live webserver.
There's nothing wrong with your code.
Hope this helps.
-
Sencha - Services Team
Hi.
Please be sure that you are browsing your application from "http://localhost/..." or a live webserver.
There's nothing wrong with your code.
Hope this helps.
-
I am also getting the same error...
How does it matter if we are hosting our app from localhost or live web server.
I m hosting frm local host
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us