Working with firefox, not working under other browsers
Working with firefox, not working under other browsers
Hi, I've been using datatables succesfully with python/django and it worked perfectly and I never had any problems. (I'm using server side processing).
Now I develop a project using ASP.NET MVC framework. I implemented all the stuff almost identically like in my python project, and to my surprise it works under firefox but fails to render under IE, Opera and Chrome. 'Processing' label is visible and nothing happens. I can see in a debugger that on server side the controller code is executed correctly for whatever browser. I suspect I'm using asp.net mvc in some wrong way, but how this could be wrong?
[code]
[Authorize]
public ActionResult AllGamesBatch()
{
//doing stuff part is cut
Response.ContentType = "application/javascript";
return PartialView("Json/AllGames");
}
[/code]
What can be wrong with this? I've tried setting other content types in response but with the same results: under firefox it works OK, fails under other browsers.
I'm using ajax in other place (not related with datatables), in exactly same fashion and it works fine under all browsers.
Now I develop a project using ASP.NET MVC framework. I implemented all the stuff almost identically like in my python project, and to my surprise it works under firefox but fails to render under IE, Opera and Chrome. 'Processing' label is visible and nothing happens. I can see in a debugger that on server side the controller code is executed correctly for whatever browser. I suspect I'm using asp.net mvc in some wrong way, but how this could be wrong?
[code]
[Authorize]
public ActionResult AllGamesBatch()
{
//doing stuff part is cut
Response.ContentType = "application/javascript";
return PartialView("Json/AllGames");
}
[/code]
What can be wrong with this? I've tried setting other content types in response but with the same results: under firefox it works OK, fails under other browsers.
I'm using ajax in other place (not related with datatables), in exactly same fashion and it works fine under all browsers.
This discussion has been closed.
Replies
To everyone that might have the same problem: check your JSONs using http://www.jsonlint.com/ :) In my case I was over-confident about the validity and didnt even bother to check... The trick is that firefox apparently can deal with certain minor JSON errors like excessive comma at the end of collection or a 'invalid' characeter somewhere in the string value. It was a combination of these two reasons why it didnt work for me in other browsers.