Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by audi on Nov 03, 2008 14:54
open dhtmlx forum
init accordion, height problem

I am having a bit of a problem with the new accordion component. I am attaching the accordion to a div, however unless I give the dive a height, the accordion panel will not draw. I looked into the DOM and it has a 0 height... but it is there.

I have tried IE7 FF3 and Chrome all more or less the same results.

Your demo's work, but they to declare a height, although the tutorials do not.

Am I simply missing something here?

Here is my code that does seem to work, although I would rather not specify the height.


<div id="navbar" style="position: relative; height: 500px;"></div>
    <script>
     var dhxAccord = new dhtmlXAccordion("navbar");
        dhxAccord.setSizes();
        //dhxAccord.setEffect(true);
        var item = dhxAccord.addItem("tree", "Navigation Tree");
        var item = dhxAccord.addItem("search", "Search");
        dhxAccord.cells("tree").attachURL("w_navtree.jsp");
        
        


    </script>


Answer posted by Support on Nov 03, 2008 23:59
Hello,

Try to comment dhxAccord.setSizes();
Answer posted on Nov 04, 2008 00:26
As shown in the code above, I have used the setSizes() function, there is no differance.
Answer posted by Support on Nov 04, 2008 01:04
Right,

Comment it or remove. Try to init accordion without it.