Datatables 1.9.4 and jQuery 2.0.3

Datatables 1.9.4 and jQuery 2.0.3

MikeSMikeS Posts: 113Questions: 1Answers: 0
edited November 2013 in DataTables 1.9
I downloaded Datatables v1.9.4 and looked at the \DataTables-1.9.4\examples\ajax\ajax.html file. I see that it uses "jquery.js" which is v1.8.2. and the example works fine.

If I change the jQuery version to be 2.0.3 as follows:

[code][/code]

the table is not displayed and the message, "Processing", is shown and never goes away.

I've tried it with jQuery version 1.10.1 and it works fine. My conclusion is that the example is somehow incompatible with jQuery v2.0.3. Can anyone confirm this?

Thanks,
Mike

Replies

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    What does the console say in your browser? Please link to a test case showing the problem.

    Allan
  • MikeSMikeS Posts: 113Questions: 1Answers: 0
    I don't have a test case other than what I've explained already.

    You simply have to unzip the download for version 1.9.4, open to the example folder containing the Ajax.html file and substitute the jquery script line as I've pointed out in my initial post and then open the modified html file in any browser. I used IE10, Opera and Chrome and they all get 'stuck' showing 'processing'. Nothing else was changed. This is simply opening a local html file from IE 10!

    As for console, I don't know what to do for that.
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    edited November 2013
    > As for console, I don't know what to do for that.

    In Chrome, right click and select "Inspect element". Then click the "Console" tab in the popup area that appears. This will hopefully have some debug information saying what the problem is. I've just tried DataTables with jQuery 2.0.3 and it see s to work okay for me. Are you loading using file:// or http:// ? Some browsers (most modern browsers I think) will not allow ajax by file:// for security reasons.

    Do the non-Ajax examples work?

    Allan
  • MikeSMikeS Posts: 113Questions: 1Answers: 0
    I do believe that I am using file:// because I'm running your examples directly from my desktop where I've extracted the v1.9.4 zip contents to the root of my local C: drive.

    As I've mentioned, the ajax.html example (actually all of them) runs fine "out of the box" as local files in IE 10 using the included jQuery.js (v1.8.3?). It fails when I change to jQuery v2.0.3.

    I stumbled upon this bug, http://bugs.jquery.com/ticket/14475 mentioning IE 11. Not sure if it has anything to do with what I'm encountering.
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    Part of the problem from the look of it, but other browsers will reject it regardless of jQuery version I think. Safari 7 does for me regardless of jQuery version - just refusing to load file:// files. If you stick it on a web-server it would work okay.

    Allan
  • MikeSMikeS Posts: 113Questions: 1Answers: 0
    I've been using datatables for a very long time in a desktop application; not a web app that needs a web server. I host an instance of IE in a Visual FoxPro form and your datatable plugin has been successfully loading local files that I create from within the application. It has been working very nicely with every version of jQuery up till 2.0.3. Hopefully the jQuery team can fix this.
This discussion has been closed.