Answer the question
In order to leave comments, you need to log in
Ask for help $.getJSON
Hello, please tell me where to dig, otherwise I have run out of ideas ...
There is a test site bestmedia.gdeomsk.ru. When you visit the link bestmedia.gdeomsk.ru/clients we see a list of clients. When you click on a client, json is loaded
$.getJSON("/clients/get_works/" + clientId + '?rnd=' + Math.random(), function(json){ .. }
. In normal browsers, everything is OK - a list of jobs falls out (when viewing, please note that jobs are not set for all clients yet). In IE… it's just silent and that's it.
I installed blackbird for debugging and IEWatch. IEWatch shows that the request is coming, but no errors are thrown and it is not included in the function (exit handler).
Code below:
* This source code was highlighted with Source Code Highlighter.
By pressing f2, you can open blackbird and see that it does not issue "getJSON in" breaks after clearing the cache in IE ... Tell me what could be the problem?
Answer the question
In order to leave comments, you need to log in
Bliiin jamb was here in what. When uploading, Python set:
but it was necessary to specify the utf-8 encoding through "-"
Like this ...
return HttpResponse(
js,
content_type = 'application/json; charset=utf8')
return HttpResponse(
js,
content_type = 'application/json; charset=utf-8')
And in what ie problems? Everything works for me in version 9.
Here's what I noticed when testing in IE6. When launched for the first time, it does not work (which is identical to clearing the cache). At the first load, it gives such an error "undefined" is null or not an object (line 477 symbol 2). Unfortunately, due to the poor debugger of IE6, it is difficult to detect a bug without code. Nevertheless, I can tell you what to do:
Apparently, somewhere in your code (perhaps even before calling JSon), an object or variable is called that is not set anywhere. In this case, IE terminates all subsequent scripts. In this case, I always use half debugging (I warn you - a black way, but it always works), that is,
first put a javascript alert after the first call to javascript. If the alert passed, insert it after the next one, etc. until the alert stops being displayed - this way you will find the error in which script.
Then insert the alert in the middle of the script - if it is shown, move it to the middle of the second half, otherwise to the middle of the first half, etc.
Once again - the way is black, but sometimes it is simply impossible in another way, especially with IE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question