а

Cell on layout or accordion


#1

Hi,

I have a page which has been divided into 3 panels, in the ‘a’ panel I have an accordion with 3 cells and on the ‘b’ another panel I have 4 tabs. On panel ‘a’ (with the accordions) on one of those accordion cells I would like to be able to refresh the contents every 5 or 10 minutes, and on the first tab of the ‘b’ panel I would like to also refresh the contents every 5 or 10 minutes.

I’ve been able to do that by simply adding a javascript as follows to my HTML.

setInterval(function(){
	GetRecords();
},300000);

However, I would really like to be able to refresh if the Accordion or the Tab is active, If the user has one of the other tabs or Accordion cells active then there is no need to refresh.

Can that be done?

Regards, Sam


#2

You may use the isOpened() method:
https://docs.dhtmlx.com/api__dhtmlxaccordioncell_isopened.html
to check if the cell is expanded.