Datatables editor in a div
Datatables editor in a div
Hello,
Before all, sorry for my english.
I created a DataTable, which would be implemented through a menu with bootstrap and jQuery, which shows the DataTable in a div, keeping the fixed menu that starts on the screen, for it only refreshes the div.
The tool for debugin chrom reports the following error when the button which init the datatable is clicked:
- Uncaught TypeError: Cannot read property 'TableTools' of undefined.
- Uncaught TypeError: Cannot read property 'Editor' of undefined
Is not a constant error sometimes shows the table correctly, others shows the table but not Editor tools, and others only shows the head of the table.
Note: The table works well if is working alone, without jQuery menus.
I can't offer a link, thats works only in a intranet
This question has an accepted answers - jump to answer
Answers
Could you confirm if jQuery is being loaded only once on your page please? Also the load order should be:
Allan
Hello Allan, thanks for faster answer.
1- I believe that que load order is correct
2 - Maybe the problem is, when each click of the menu, reload all the libraries. This is the code:
But with this next modification, that disabled the menu option:
Show the datatables correctly and works rignt. In more complex datatables, that is a right solucion?,
3 - I upload the code at the next url, to show you, but the datatable doesn't work. Why?
http://www.miky.es/int/gimdal/m_admin.php
And in this other one url i upload only the datatable code, and works right
http://www.miky.es/int/data/persones.html
Thanks for the patience with the newwers
I'm afraid I don't quite understand why you would reload all of the libraries? Why not just keep using the same ones and modifying the HTML?
Allan
Hello Allan,
I think I have not explained properly, sorry.
finally I believe find , which is the problem.
I created a more easy code, and I upload to a server, too.
http://miky.es/int/proves0.0.1/datatables/index.html
This code worked correctly in internet server, but the same code doesn´t worked correctly in a xamp server. to go crazy.
Well, now, work without errors in the two servers.
Why? I think that the cache load another older jQuery library without calling (as you say me in the first comment) . That produce sometimes shows the table correctly, others shows the table but not Editor tools, and others only shows the head of the table (on each click).
Lambert
Hi Lambert,
I'm afraid I don't know why it wouldn't work on an xamp server. I don't really see why a different HTTP server would make a difference, assuming they are severing the files up the same way.
Allan