I\'m working on a script to load some images async using jQuery.
Here is a code snippet of the function that loads the images -
try{
for(img in i
use the following tag to support cross browser
$.support.cors = true;
Maybe there is a problem with encoding. try this
$.ajax({
type: 'GET',
url: encodeURI(url ),
dataType: 'text',
success: function (data) {
result = JSON.parse(JSON.parse(data))
}
});
If you use input check if you have one choice as "selected", if you don´t ie do not pass this parameter to ajax function.
I've been having similar problems with IE and AJAX over the past few days with my JSONP Web Service. Even the smallest error in your code can cause everything to break in IE.
Probably the best thing to do is debug the page in IE using Visual Web Developer Express or Visual Studio. Here is a tutorial of how to do it:
How to debug JavaScript with Visual Web Developer Express
Follow the instructions and maybe place breakpoints on at the begining of the AJAX request.
Try these things too:
Hope you get it working soon!
I came to this question with similar issues. And answers above fixed many of my problems. However, there's one more trick I need to do. Don't use
$.ajax({...,
success: myfunc,...});
use
$.ajax({...,
success: myfunc(),...});
Try setting the cached-option to false.
$.ajax({
async: false,
cache: false,
type: "get",
url:imgsArray[img],
success:function(imgFile){
alert("success");
//do something useful
},
error:function(XMLHttpRequest,status,error){
//do nothing
}
});//ajax