IE7 & jquery ajax XML: permission denied on local xml file

Viewed 1651
$('.upload').change(function () {
    var $container = $('#container');
    $container.find('input:checkbox, input:text, select').val('');

    var $thisUpload = $(this);
    var path = 'file:///' + $thisUpload.val().replace(/\\/g, "/");

    $.ajax({
        url: path,
        dataType: 'xml',
        success: function (data) {
        },
        error: function (request, status, error) {
            if (error.message == 'Permission denied') {
                //this is where i end up
            }
        }
    });
});

I know that a "blocked" file can cause this error in IE:

http://webactivedirectory.files.wordpress.com/2011/10/unblockfile.png

However, this file is not blocked. And it is located next to my .html file containing the code above.

What could possibly cause the "permission denied". I highly doubt this is due to the same origin policy.

Any help is MUCH appreciated. Thanks

Edit: This only occurs on my windows xp computer using ie7. Ie7-mode in win7 works well.

Edit #2: This only occurs for xml files which are downloaded as mail attachments.

6 Answers
Related