Delay loading from AJAX until a click/event

Delay loading from AJAX until a click/event

mathiemathie Posts: 36Questions: 0Answers: 0
edited November 2009 in General
Hello,

I have several jQueryUI tabs, each tab has a table with their own data. However, if the tab is not active, no data is needed. Data should be loaded only if it's the active tab or the user clicks on that tab. Can it be done? Meaning can I call fnReloadAjax() manually instead of auto-init mode?

Thanks

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi mathie,

    Two options spring to mind,

    1. Just do the initialisation for each DataTable when the tab becomes active.

    2. Initialise the all together with empty data, as you suggest, and then you fnReloadAjax() to populate them as required using the tab's events handlers.

    Regards,
    Allan
This discussion has been closed.