Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by shweta on Nov 13, 2008 00:36
open dhtmlx forum
call java script function on tab clicking

i'm using dhtmlxtabbar as

<div id="a_tabbar" hrefmode = 'ajax-html' class="dhtmlxTabBar" imgpath="<%=request.getContextPath()%>/images/" style="width:975px; height:350px; margin:auto" skinColors="#FFFFFF,#AADAFD" >


<div id="maintain" name="Maintain" selected='<%=(screenName=="Maintain"?"1":"0")%>'
         href='tab_maintain.jsp' onbeforeinit='test1()' ></div>

    </div>        

<script>
function test1(){
    alert('hi');
}
</script>

while clicking on maintain tab test1() is not called.Please suggest me solution for this




shweta
Answer posted by Support on Nov 13, 2008 05:17
The tab-clicking code can't be set in such way. 
One of correct ways is next
<div id="a_tabbar" hrefmode = 'ajax-html'  onbeforeinit='configure()' 
...
<script>
    function configure(){
          a_tabbar.setOnSelectHandler(test1);
    }