PDA

View Full Version : Extjs 4 In mozilla firefox data is not loading from store in view



amarnath1
31 Dec 2013, 6:53 AM
In mozilla firefox,i am unable to retrieve view data in my grid which is coming from database.The same code is working in internet explorer and chrome.
Inside store ,
I am maintaining store proxy like this

proxy: {
method:'GET',
noCache: false,
type: "ajax",
url:"www.abc.com",
reader: {
type : 'json',
}
},


headers: {
'Content-Type': 'application/json;charset=utf-8'
},
}
Do i have to change anything in my code to make it working?

scottmartin
31 Dec 2013, 7:35 AM
Are you not getting a response in FF? If you enter the URL in your browser direct, do you see the return JSON?

amarnath1
31 Dec 2013, 9:58 PM
I am getting this error when i see the response in firefox browser.

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error><Message>An error has occurred.</Message></Error>


The same error i am getting in chrome but data is populated in my view.In internet explorer only,i am able to see the json response.but except mozilla firefox .data is displayed in my view in other browsers

amarnath1
31 Dec 2013, 11:31 PM
I found the solution of my problem.In store we have to add one header property which will send the request data in json format.
headers: { "Accept": "application/json" }

Then i am able to get store data in view.

kunjanshah4
21 Oct 2015, 1:22 AM
I have written the same code : headers:
{ 'Content-Type': 'application/json;charset=utf-8', 'Accept': "application/json" },
but the same thing is happen, my store / grid table is grayed out and its does not work on FireFox browser.This is worked on chrome and IE but not work in FireFox.