Not expand/collapse accordian cell header programmatically

Hi,

I have a accordian control in multimode, in the text of each of the accordian cells I have a html string which is a div with a table, which will eventually divide the accordian cell header into 3 sections, I am showing some information in the first section and in the second and third section I show icons which when clicked perform some action.

When I click on the first section, the accordian cell expands/collapses, which is what I want, but I don’t want accordian cell to expand/collapse , when i click the second or the third sections.

I think I can use the onBeforeActive event on the accordian, but I don’t know how to pass a flag to the event handler to indicate that a region on the accordian header has been clicked.

following is the code example to give you a better idea.

// define a div with 3 sections,
// first shows some info, 
// second and third have anchor tags, which when click call some javascript function, 
// We don't want to expand or collapse the accordian cell when those are clicked.

var headerString ='<div >
<TABLE width="98%">
  <TR><TD width="70%" align="left" >ABC</TD>
  <TD align="right"> <a href="#" onclick="abc();"><IMG SRC="icoCircleBlue_13x13.gif" /></a> 
</TD>
<TD>
<a href="#" onclick="efg();"><IMG SRC="ico_file_excel.png" /></a>
  </TD>
  </TR>
</TABLE>
</div>';

accordianItem.setText(accordCellHeader);


dhxAccord.attachEvent("onBeforeActive", function(itemId) {
         log.debug(' onBeforeActive event was called for item id ' + itemId);
	return false;
}
);

Hello,

please see:
docs.dhtmlx.com/doku.php?id=dhtm … foreactive

you need to save somehow value of clicked section for exmaple,
also you may try to add code like this, probably this will help:

item.onclick = function(e){
e=e||event;
e.cancelBubble = true;
e.returnValue = false;
return false;
}

item is DOM element (your section)
in theory, click on your element will ocued befire header click, so there is a possibility to cancel event before it will fired on accordion’s header.