Page 1 of 1

Tab onclick?

Posted: 05 May 2014
by holtonba
Is there a way to run some javascript when a tab is clicked? We have a bunch of tabs and would like to know which tab is clicked so that an HTML element can be set dynamically.

Re: Tab onclick?

Posted: 06 May 2014
by Dmitry Kozlov
Sure, put the following code into JS-editor of Forms Designer:

Code: Select all

$('#fd_tabcontrol-0').on('tabsactivate', function(event, ui) {
  alert('New tab: ' + ui.newTab.text());
  alert('Previous tab:' + ui.oldTab.text())
});