Page load everytime the Tab is clicked

I am a DHTMLX Tabbar user. My application requires page refresh everytime a Tab is clicked.

There are two modes for loading pages in DHTMLX taabar

iFrame: All the tabs and its content pages are loaded at once

IFrame-on-demad: The tab gets loaded but content gets loaded when user clicks on the tab but this happens only once. If user clicked the tab and then he navigates to another tab and comes back to same tab it doesn’t get reloaded.

My requirement here is that the content page should get reloaded everytime tab is clicked.

Please suggest the solution for my requirement.


there are 3 iframe-based loading mode in tabbar:

  1. iframe - one iframe is used. The correspong page is loaded each time the acitve tab is changed.
    it seems that it is exactly what you need;
  2. iframes - different iframes are used for each tab, pages are loaded at once,
  3. iframes-on-demand - the same as iframes, but a page is loaded when tabbar is selected first time.

Thanks for the suggestion.

After changing the loading mode from iframes-on-demand to iframe, it worked like we expected but another problem cropped up- we were using the dhtmlxTabbar.tabWindow(…) method (to access some elements in the page) which is broken now.

Could you please suggest how we can solve this as we have used it in many places in our application.

Have you included dhtmlxcontainer.js in your page?

If you have, please try to use modified container library that is attached here:
and dhtmlxTabbar.cells(tabId).getFrame() instead of dhtmlxTabbar.tabWindow(tabId)

We are usning 2.1 version of DHTMLX suite.

This suite do not containf dhtmlxContainer.js file.

Please suggest if this solution will work with 2.1 version.

The previous answer related to 2.6 version.

tabWindow works in 2.1. However make sure that method is called when page is loaded (iframes-on-demand mode doesn’t load all pages at once).

We want to use iFrame mode of loading tabs in version 2.1 so that page in the tab gets loaded everytime tab is clicked.

We were using the dhtmlxTabbar.tabWindow(…) method (to access some elements in the page) which is giving error in iframe mode but works fine with iframes-on-demand.

In case of “iframe” mode, only one page is available - defined for the active tab.

var win = dhtmlxTabbar.tabWindow(dhtmlxTabbar.getActiveTab());

Make sure that you apply this method for the loaded page.