jQuery ajax success chaining Internet Explorer Issues
- by Nickd
I have a jQuery ajax function that retrieves JSON data. In the success block I call another function to parse the data and update the page. At the end of this parsing/updating function a different ajax call is made. This works perfectly in all browsers except Internet Explorer (7 and 8). The problem is Internet explorer thinks the script is taking too long to process because the success block from the first ajax call doesn't complete until the 2nd ajax call finishes.
I get the message:
"Stop running this script? A script on this page is causing your web browser to run slowly. If it continues to run, your computer might become unresponsive."
My jQuery code:
$("#id_select").bind("change", function(e){
$.ajax({
url: "/retrieve_data.js",
data: {id:$(e.target).children(":selected").attr("value")},
type: "get",
dataType:"json",
success: function(data, status, form){
processData(data);
},
error: function(response, status){
alert(response.responseText);
}
});
})
Any suggestions on how to get IE to stop timing out or to accomplish this task without rewriting all my jQuery functions would be appreciated.