This ajax request checks if a TIF file exists in a specific directory and either sets a button to open the file or display an error message if it does not exist.
$.ajax(
{
cache: false,
url: directory,
success: function() { $("#img" + row).click(function() { window.location.href = directory; return false; }) },
error: function(data) { alert(data.responseText); $("#img" + row).click(function() { $("#ImageDialog").dialog("open"); return false; }) }
});
Sometimes, but not always, IE8 returns a failure, even if the file exists, and FF and Chrome return successes. I added "alert (data.responseText)", trying to debug the problem, but I never get a warning window. IE instead throws "System Error: -1072896748".
What's happening?
source
share