Control Ajax queries

Control Ajax queries

GeorgeHelmkeGeorgeHelmke Posts: 44Questions: 16Answers: 0

My table is in a modal popup. I would like to prevent the ajax query until the user actually shows the modal, because 90% of the time, they never go in the popup.

The way it works now is that the table is activated the minute the page is loaded, including the html for the popup. That then seems to trigger the ajax query.

Replies

  • allanallan Posts: 54,700Questions: 1Answers: 8,556 Site admin

    Hi,

    What model library are you using? Does it provide a callback or event to let you know that it has been activated? If so, I would suggest that the simplest way of doing what you are looking for is to simply not initialise the DataTable until the model is shown.

    Allan

This discussion has been closed.