Question

I have a page with a large table that uses jquery quicksearch to quickly search the table. This function as written works fine in Chrome, FF, and IE8 but in IE9 it fails. In fact it seems to fail in such a way that the remaining portion of the $(document).ready() doesn't complete. Any ideas on what I can change in order to get this working in IE9?

$(document).ready(function () {
            $("#search_box").quicksearch("table#invTable tbody tr", {
                noResults: '#noresults',
                stripeRows: ['odd', 'even'],
                loader: 'span.loading',
                onAfter: function() {
                    document.getElementById("count").innerHTML=($('tr:visible').length-1);
                    }                   
                });

EDIT: It looks like this error in the IE9 console is the problem:

SEC7112: Script from https://raw.github.com/riklomas/quicksearch/dev/jquery.quicksearch.js was blocked due to mime type mismatch

Now I just have to figure out how to fix it!

EDIT2: File is hosted locally works. To the commenter who suggested this - add it as an answer and I'll mark it correct.

Était-ce utile?

La solution

The Github-hosted version of this JavaScript file comes down with the text/plain mime-type. If you were to host the file locally you wouldn't have this problem, as the content-type would be text/javascript. The same rule applies for CSS as well.

Further reading: MIME-Handling Changes in Internet Explorer

enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top