I'm using extjs 3.4. I have a form. Inside I want to display some ajax content. But i'm getting [object object] whenever alert that variable. I tried stringify
Json.decode
But no luck. Here is my code,
var sourcePath = new Ext.data.Store({
reader: new Ext.data.JsonReader({
fields: ['path'],
root: 'rows'
}),
proxy: new Ext.data.HttpProxy({
url: '/plugin/BODImageImport/admin/getsourcepath'
}),
autoLoad: true
});
And my form,
var bodimportForm = new Ext.form.FormPanel({
html: "<p>Imgae source: <b>"+ sourcePath +"</b> folder in root directory</p>",
url: '/plugin/BODImageImport/admin/import',
any help or hint would be very helpful for me.
Update:
My Json is looks like this,
{"rows":[{"path":"bodyshop\/tr\/media\/inbox"}]}
I just trying to get that path in html tag.
Update: When i'm printing objects using console.log() I'm getting below things. But I don't know how to get my value,
Here sourcePath is a store instance.
So you cannot do html:
Imgae source: "+ sourcePath +"
In order to get the value inside the store you must do
and inside your reader
should have been
since your json root is rows and not rowsDir