DataTables will not work after refresh of browser?

DataTables will not work after refresh of browser?

knutknut Posts: 2Questions: 1Answers: 0

Hi
Until now I have use other table sorting script on my webpage, but after some problem I try to implement DataTables.

But the following problem occur.
I think it is some **initializing **of script problem, but can't find out of it.

It is a classic .asp page with a combo box for choosing products.
I use bootstrap for design and jquery is included for other things also.
Everything is up to date.

After page refresh the datatables won't work.
On Firefox it work only first time i load page. Version 48.0
Chrome and Opera are OK, but not after refresh page.
Chrome Versjon 52.0.2743.116 m
When I choose a new product it is OK until I refresh. I use the get method.
Sometimes it work after hit F5 many times??

The same happen on IOS latest on my ipad and iphone. And also on android and a lumia phone.

I test this now on one of my pages.
It is in Norwegian.
http://www.matoppskrift.no/sider/Produkttester_utvidet.asp?ID=Bakemel
Choose from dropdown or refresh existing

My load order for includes are:
Bootstrap css
my ovn css
jquery.js
bootstrap.js
datatables.css
datatables.js
Init code

Init code are:

$(document).ready(function() {
    $('#produkttester').DataTable();
} );

produkttester are the ID of the table.

Have anyone any ideas?
Or if anyone have any links to solution on how to initialize script i right order.

And how to use table reload on page refresh?
Example window.location.reload(); is working first time, but then fail.

I am originally an old VB programmer but now use only .asp against MSSql server.
But I am impressed and overwhelmed of the work behind DataTables.


I dont understand how to use DataTables Debug bookmarklet!

mvh
Knut

Answers

  • knutknut Posts: 2Questions: 1Answers: 0

    Problem already solved!!
    I had use <script async> in the script include.
    take away "async" and it is OK.

    Sorry for asking before I debug properly

    mvh
    Knut

This discussion has been closed.