Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jack River on Jul 22, 2009 02:13
open dhtmlx forum
DhtmlxAccordion Lock

Hi,

DhtmlxTabbar allow to disable Tabs, is it possible to do the same thing with an Accordion ?

Best regards,

Jack River
Answer posted by Alex (support) on Jul 22, 2009 02:54

hello, 

you can use onBeforeActive event. It should return true for items that can be open. For example if item with id = "a2" is disabled, the code can be following:

dhxAccord.attachEvent("onBeforeActive",function(id){
  if(id!="a2") return true;
})

Answer posted by Jack River on Jul 22, 2009 06:24
Thanks, it works fine.