Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Gaurav Arora on Dec 02, 2008 22:06
open dhtmlx forum
get open/close state of accordion

When I use

if (String(dhxAccord.idPull[itemId]._content.className).search("dhx_acc_item_content_opened") != -1) 

to get the open/close state of accordion, it always gives me the state as opened. Please check what is wrong in this. Thanks.

Answer posted by Support on Dec 03, 2008 07:43
itemId is a variable. you should replace it with your item's id.
Answer posted by Gaurav Arora on Dec 03, 2008 22:17

Hi,

Please find attached the html file in which I am facing the problem of getting same state of accordion as opened always. Requesting you to look into this and let me know what is wrong here.

Thanks,

Gaurav Arora

Attachments (1)
Answer posted by Support on Dec 04, 2008 02:55
Incorrect syntax:
dhxAccord.cells(itemId).attachEvent("onclick", function(){
1. event should be attached to dhxAccord;
2. accordion doesn't have "onclick" event.