0

I have an Ajax code, and it work's, but not in IE10. In the debugger I see that no parameters sent, and no data recived.

I tried to put this inside the <head>:

<meta http-equiv="x-ua-compatible" content="IE=9" />

But it's not helped.

The Code:

$.ajax({
    url: 'ajax/unlock.php',
    type: 'post',
    data: { 'password': password, 'file': $("input[name='fileId']").val(), 'keep': ($("input[name='keep']").is(':checked')) ? 'true' : 'false' },
    cache: false,
    beforeSend: function() {
        $("#locked_div").html('<img src="img/ajax-loader.gif" alt="loading" />');
    },
    success: function(data) {
        if(data.charAt(0) == 0) {
            data = data.slice(1);
            $("#locked_div").html('<button id="locked">הורדה נעולה</button><p id="error"></p>');
            $("#error").html(data);
        } else {
            $("#locked_content").slideUp(); 
            $("#prem_message").slideUp(function() {
                $("#dl_section").html(data);
                $("#download").fadeIn('slow');
            });
        }
    }
});

What's the problem?

Thanks, and sorry for my English

HTMHell
  • 5,761
  • 5
  • 37
  • 79
  • Are you getting any Javascript errors? – Barmar Oct 13 '13 at 17:26
  • @Barmar No, there are no errors in the console – HTMHell Oct 13 '13 at 17:29
  • What version of jQuery? – Mataniko Oct 13 '13 at 17:56
  • Is it at all feasible to move to 1.9.x? IE10 didn't exist when 1.7.2 came out so support is expected to be spotty. – Mataniko Oct 13 '13 at 18:00
  • @Mataniko I tried it on the newest version of jQuery, and it's steal not working – HTMHell Oct 13 '13 at 18:04
  • jQuery 2 removes support for older versions of IE, in that case compatibility mode under IE 10 can break things. There's a bunch of info about setting compatibility mode [here](http://stackoverflow.com/questions/6156639/x-ua-compatible-is-set-to-ie-edge-but-it-still-doesnt-stop-compatibility-mode) that might be useful. A little more information is needed at this point, what part of the code doesn't execute, did you try putting breakpoints? You definitely need to upgrade to jQuery to 1.9.x if you want to keep IE 9 and under compatability. If you can set up a fiddle that would be very helpful. – Mataniko Oct 13 '13 at 18:18
  • As others have stated, you can move to jQuery 1.9.x, but you may have to update other plugins that rely on `$.browser`. This was removed for 1.9. – ps2goat Oct 13 '13 at 19:47

0 Answers0