Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Getting .ajax to work in IE8?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #151988
    mikes02
    Participant

    I have searched extensively on Google and can’t find a solution to fix this problem:

        // Availability
    $.ajaxSetup({cache:false});
    $("a.ajax").click(function()
    {
        var post_url = $(this).attr("href");
        var post_id = $(this).attr("rel");
        $("#tabs").html('<div class="loading"><img src="'+templateUrl+'/images/ajax-loader.gif" width="66" height="66" alt="loading"></div>');
        $("#tabs").load(post_url);
        $("a.ajax").removeClass("active");
        $(this).addClass("active");
        return false;
    });
    
    // Default Load January Availability
    $("#tabs").empty().append('<div class="loading"><img src="'+templateUrl+'/images/ajax-loader.gif" width="66" height="66" alt="loading"></div>');
    $.ajax({ url: siteUrl + '/?availability=january', success: function(html)
        {
            $("#tabs").empty().append(html);
            $('.availability-menu li:first-child a').addClass('active');
        }
    });     
    

    I am using this code in WordPress to load in a custom single post template, but I can’t get it to work in IE8, any ideas?

    #152180
    mikes02
    Participant

    I am using this to call jQuery so I believe that is grabbing the latest minified version, which as of this posting is v1.9.1

    Perhaps I am not using this correctly but when I look in the developer tools console in IE I am not seeing anything displayed, here is the code I am using:

        // Default Load January Availability
    $("#tabs").empty().append('<div class="loading"><img src="'+templateUrl+'/images/ajax-loader.gif" width="66" height="66" alt="loading"></div>');
    $.ajax({ url: siteUrl + '/?availability=january', success: function(html)
        {
            $("#tabs").empty().append(html);
            $('.availability-menu li:first-child a').addClass('active');
        }
    });
    
    //FAIL
    $.ajax({url: siteUrl + '/?availability=january'}).fail(function( jqXHR, textStatus, errorThrown ){
        console.log(textStatus);
    }); 
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.