Opening a dialog from Button second time looses loaded Libs?

Opening a dialog from Button second time looses loaded Libs?

TrondTrond Posts: 1Questions: 1Answers: 0

I am opening a Jq Dialog from a datatable button.
The dialog is filled with an external php page (kontakter.php) using ajax.

First time around it works fine, second time button is clicked, kontakter.php reports xxx is not a function
Seems like the library is no longer available in kontakter.php loaded this time.
I am trying to use libs like Chosen, bootstrap-multiselct and others in kontakter.php

Added the lib in the header of both datatable script and the script loaded in the dialog.
Would appreciate any help.

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    How is Datatables involved with this flow? Presumably you are calling functions that are outside of Datatables when clicking the Datatable button. Try using a standard button to see if the behavior / issue is the same.

    If you still feel its a Dartatables issue then please post a link to your page or a test case replicating the problem so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

This discussion has been closed.