Tabs history navigation

Problem

How to provide tabs history navigation (through the forward and back browser buttons) in multiview?

Solution

DHTMLX Touch provides forward/back history navigation between multiview tabs, i.e. you can move back and forth through the user's history of clicked tabs by means of browser navigation buttons.

Tabs history is stored as a part of common browser history and can be managed through the dhx.history class.
To activate storing and provide navigation you should just call the method start():

dhx.history.start();

The method can be used in 2 forms:

  • start('id1', 'id2'..) - where 'id1', 'id2' are the ids of multiviews which history you want to store.
  • start() - in this case the app will store history of all initialized multiviews.



Briefly about other dhx.history methods you may need:

  • active() - checks whether history navigation is activated. Returns true if it's activated and false otherwise.
  • stop() - pauses storing tabs history. Call start() to resume storing.
  • ignore() - 'says' to ignore the specified multiview tabs while storing history. Takes as the parameter the ids of multiview tabs.
  • unignore() - 'says' to resume storing history of an ignored tab. Takes as the parameter the id of a multiview tab.
  • reset() - clears all the stored history and stops further storing for all the activated multiviews.

Related sample: 01_views/11_multiview_history.html