jQuery AJAX callbacks do not fire in Firefox

jQuery AJAX callbacks do not fire in Firefox

I am doing what I thought was a very simple thing. I am checking the status of the response of a text file on a server using AJAX, and then performing an action, depending on the response received by the AJAX call.

Here is the code:

jQuery.ajax( { url: strUrl, cache: false, type: 'GET', async: false, success: function() { alert('Success!'); }, error: function() { alert('Failure!'); }, timeout: 5000 } );


The strUrl object could literally be any .txt file on any server (e.g., http://domain.com/textfilename.txt).

Of course, the success and error functions would obviously be something else. I have changed them to alerts for illustration. The fact is, regardless to the option values, neither event fires in Firefox (3.0.16), whereas both events fire every time in IE 8.

When I step through the code using Firebug, I have verified that this line gets hit without error. The resulting events just are not fired.

Does anyone have any idea why Firefox is not allowing this code to work? Is this a security issue or something the IE wasn't supposed to allow to happen? I am drained on this one... Any help is appreciated.

[EDIT]
Just so you know, I have tried a work-around using .load() instead of the AJAX call. Here is my example:

jQuery('#divTextFile').hide();
jQuery('#divTextFile').load(strUrl, '{}', handleAjaxResponse);

function handleAjaxResponse(responseText, textStatus, XMLHttpRequest) {
            if (XMLHttpRequest != null) {
                if (XMLHttpRequest.status == 200) fileFound(responseText, textStatus); else fileNotFound(XMLHttpRequest, textStatus, null);
            }
}


Once again, we have the same result... IE works fine, and FF does not do anything. It just runs the lines of code, but Firebug reveals that FF doesn't ever enter the handleAjaxResponse method as show above. Argh!
[/EDIT]

[EDIT2]
I just added alerts all over the place in my jQuery, and found this in FF...

function doesFileExist(){
            alert('BEGIN doesFileExist()');
            var strUrl = jQuery('#lnkFile').attr('href');
            jQuery.ajax( { url: strUrl, cache: false, type: 'GET', async: false, success: fileFound, error: fileNotFound, timeout: 5000 } );
            alert('END doesFileExist()');
}


In the example above, the second alert never executes, nor do the alerts in the callback functions (fileFound, fileNotFound).
[/EDIT2]