Categories | Question details Back To List | ||
setTabActive not working I have created a tabbar using html structure. I want to set a specific tab active on click of a button. I have used 'setOnSelectHandler' to get the value of the active tab and set it in a variable. On clicking of a button I am calling the setTab(). However I am getting an error : 'a_tabbar is not defined' in Firefox and 'Object does not support this property or method' in IE. Below is the code. <script language="JavaScript"> var indWin = null; var dhxWins=null; var schedulingFormFields; function onbodyload(){ a_tabbar.setOnSelectHandler( function setTab(idn,ido){ document.form.elements['activeTab'].value = idn; return true; } ) } function setTab(){ if( document.form.elements['activeTab'].value != ""){ a_tabbar.setTabActive(document.form.elements['activeTab'].value); } } function savProfile(){ ...... setTab(); } </script> <div id="a_tabbar" class="dhtmlxTabBar" imgpath="../scripts/dhtmlx/dhtmlxTabbar/codebase/imgs/" style="width:750px;height:220px;" skinColors="#FCFBFC,#F4F3EE" tabstyle="modern" style="simple" autoresize="false" autosize="false,false" select="a1" enableForceHiding="true" oninit="onbodyload()"> <div id="a1" name="Schedule"> .... </div> <div id="a2" name="Amount"> </div> <div id="a3" name="Indicators"> </div> </div> Thanks in advance. Answer posted by Alex (support) on Aug 17, 2009 02:09 The code looks correct Is a_tabbar a global variable ? Please, provide the complete demo to reproduce the issue |