dhtmlx tabbar onTabContentLoaded not working


I am trying to load data on tab select my code is like:

tabbar = new dhtmlXTabBar("dataTabbar", "top"); tabbar.setSkin('silver'); tabbar.enableAutoReSize(true); tabbar.enableAutoSize(true,true); tabbar.setImagePath("../dhtmlx/dhtmlxTabbar/codebase/imgs/"); tabbar.addTab("tab1", "Tab 1", "*"); tabbar.addTab("tab2", "Tab 2", "*"); tabbar.addTab("tab3", "Tab 3", "*"); tabbar.addTab("tab4", "Tab 4", "*"); tabbar.setHrefMode("ajax-html"); tabbar.setContent("tab1", "tab1"); tabbar.setContent("tab2", "tab2"); tabbar.setContent("tab3", "tab3"); tabbar.setContent("tab4", "tab4"); tabbar.attachEvent("onTabContentLoaded", function(id){ alert("content loaded - " + id); return true; }); tabbar.attachEvent("onSelect", function(tabId,last_id) { alert("content now needs to be loaded"); // some Ajax call that will fetch the results return true; }); if(document.getElementById('tabSelected').value){ tabbar.setTabActive(document.getElementById('tabSelected').value); } else { tabbar.setTabActive("tab1"); } the alert inside the "onTabContentLoaded" function is not coming up. kindly help