IE 11 doesn't fire new ajax request

IE 11 doesn't fire new ajax request

jimbojimbo Posts: 3Questions: 1Answers: 1

I have a button that when clicked goes through a form and creates a custom url to be called to retrieve data. Works great on FF and Chrome. In IE, the load event never seems to be called.

$("#custom-search-button") .unbind() // Unbind previous default bindings .bind("click", function(e) { // Bind our desired behavior var dtable = $(".datatable").dataTable().api(); var searchUrl = getServiceUrl(); dtable.ajax.url(searchUrl).load(); return; });

The line dtable.ajax.url(searchUrl).load() never gets called by IE 11. Any ideas?

This question has an accepted answers - jump to answer

Answers

  • jimbojimbo Posts: 3Questions: 1Answers: 1

    Sorry about the formatting. It should have been:

        $("#custom-search-button")
            .unbind() // Unbind previous default bindings
            .bind("click", function(e) { // Bind our desired behavior
                var dtable = $(".datatable").dataTable().api();
                var searchUrl = getServiceUrl();
                dtable.ajax.url(searchUrl).load();
                return;
            });
    
  • jimbojimbo Posts: 3Questions: 1Answers: 1
    Answer ✓

    I found the issue. The problem was with my selector.

    It should have been:
    var dtable = $("#example").dataTable().api();

    I think the problem is that the selector I have could match multiples. By selecting on an id, it came back with a single api object.

This discussion has been closed.