Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jorge Arzuaga on Jul 31, 2009 10:24
open dhtmlx forum
dhtmlxAccordion problem in IE when join to html tables

Hi, i using the code below to generate the Accordion, its works, but when i combine with table html this donīt work, and show the next code:

Mensaje: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

what is the problem?

<div id="a">1 </div><div id="b" >2</div><div id="c" >c</div>
<script type="text/javascript" src="../../js/dhtmlxcommons/dhtmlxcommon.js"></script>
<script src="../../js/dhtmlxaccordion/dhtmlxaccordion.js"></script>
<script src="../../js/dhtmlxwindows/dhtmlxwindows.js"></script>
<link rel="stylesheet" type="text/css" href="../../js/dhtmlxaccordion/skins/dhtmlxaccordion_dhx_blue.css">
<link rel="stylesheet" type="text/css" href="../../js/dhtmlxWindows/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="../../js/dhtmlxWindows/skins/dhtmlxwindows_dhx_blue.css">
<div id="acordion" style="position: relative; width: 500%; height: 400px;"></div>
<script type="text/javascript">
var accor_acordion = new dhtmlXAccordion("acordion");
accor_acordion.addItem("as", "a1");
accor_acordion.cells("as").attachObject("a",true);
accor_acordion.openItem("as");
accor_acordion.addItem("bs", "b1");
accor_acordion.cells("bs").attachObject("b",true);
accor_acordion.addItem("cs", "c1");
accor_acordion.cells("cs").attachObject("c",true);     

</script>

Thanks...

Jorge Arzuaga
Answer posted by Alex (support) on Aug 03, 2009 01:01

Hello,

the ussue wasn't reproduced. The sample is attached.

Attachments (1)
Answer posted by Jorge Arzuaga on Aug 03, 2009 06:18
See, the file sample.html, with the tables, and see the error en IE... thanks..
Attachments (1)
Answer posted by Alex (support) on Aug 03, 2009 07:00

Hello, 

try to replace the accordion initialization code after table tag:

...

</table>
<script type="text/javascript"> 
var accor_acordion = new dhtmlXAccordion("acordion"); 
...

or in window onload handler.

Answer posted on Aug 03, 2009 07:04
But i need the accordion into html table? it´s possible?
Answer posted by Alex (support) on Aug 03, 2009 07:07

accordion can be inside table. But the script, that initializes accordion, must be called correctly. The sample is attached.

Attachments (1)
Answer posted by Jorge Arzuaga on Aug 03, 2009 07:10
Tanks... it's work,