Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Kris A on Feb 12, 2009 07:56
open dhtmlx forum
Accordion opens up default on page refresh.

Hi there,

We have a lot of DHTMLX accordion on the main page, each accordion contains a grid with a link. when user clicks on the link, he goes to a new page, but when he clicks the back button, the main page defaults to the default open accordion.

I knw the solution is to save the item in a session and use that, but i just have no clue as to how to get at the currently open accordion item.

This problem is killing us, and i have posted this before here too.

If you can kindly post an example here, that would be very helpful, and highly appreciated.

Rgds,
Kris A
Answer posted by Alex (support) on Feb 12, 2009 08:57

Hi,

There is onActive event which can be used in order to get the active item:

var selected_item = some_default;

dhxAccord.attachEvent("onActive", function(id){

selected_item = id;

})

Answer posted by Kris A on Feb 12, 2009 11:45

Allright great. Got this working. Many thanks.