I have problem with jQuery. When I upload image in Chrome it performs the AJAX successfully and I am able to update the page with the response data. But in IE 11 and Firefox it does not. The code:
$(".newfoto").on('submit', (function(e) {
    $("#mailresult").html('<img src="themes/standart/iconss/spin1.gif" alt="loading..." /><p>Please, wait...</p>');
    e.preventDefault();
    $.ajax({
        url: "dataok.php?act=foto",
        type: "POST",
        data: new FormData(this),
        contentType: false,
        cache: false,
        processData: false,
        success: function(data) {
            $("#mailresult").html(data);
            setTimeout(function() {
                $("#mailresult").empty();
            }, 2000);
            var imgTag = '<img src="image.php?imgid=' + escape($('.myphoto').attr('id')) + '" />';
            $('.myphoto').html(imgTag);
        },
        error: function() {}
    });
}));
 
     
    