IE: attachObject in Accordion not loading


In Accordion (v3.5), the attachObject does not load the content when page loads in IE8 and IE9. We need to open and close items to see the content of the item (content is defined in DIVs). It works as expected in FF.

My code:
var dhxAccord;

	dhxAccord = new dhtmlXAccordion("accordObj");
	dhxAccord.addItem("a1", "1: Direct Scanner Trigger Input");
	dhxAccord.addItem("a2", "2: Scanner Output or File Import");
	dhxAccord.addItem("a3", "3: Generic");
	dhxAccord.setIcon("a1", "images/24/040-scaner.gif");
	dhxAccord.setIcon("a2", "images/24/059-doc_new2.gif");
	dhxAccord.setIcon("a3", "images/24/029-app.gif");


	dhxAccord.cells("a2").open();<img src="/uploads/default/original/2X/0/0f0d96ab0b8e79efcbf5e40666e7cb0075c7f4d2.png" width="690" height="242"><br/>

Made a demo based on your code snippets.
Everything is work.
See attaches.
acc.rar (293 KB)

indeed your example works. But as you imagine my page is not so simple. There is something somewhere in my page that blocks/interferes with the content to attach on page loading.

-content div location in page?
-DIV content? I have JS and applet in some DIV to attach…
-There is a TABLE wrapping the Accordion DIV. Has this influence?

The reason is the body onload:

I do not use it. I call the function like:

and this way even your example does not work on IE.

I cannot use the body onload because my PHP pages are included into the main layout. Any solution??


I found a workaround that I could adapt to solve my problem:

Please, try another sample. It seems to work.
Replace html file.
acc_test.rar (939 Bytes)

but this turns each DIV content management very hard to do. There are forms to put in those DIVs, etc
Your example need to construct the DIVs content by JS innerHtml, etc.

It is just sample. You can build them the other way. :slight_smile:

The same accordion now works. Accordion is inside a FORM to give choices of fields according to user choice.
But, in IE9 the fields inside each accordion sections (DIV) are NOT POSTED in IE9. It works well in IE7,IE8 and even IE10 and FF. For some reason in IE9 only the fields outside the accordion are posted.

the form is like this

table row ACCORDION with fields table tow moe fields

Any idea what can cause this?


We need completed demo to test your issue. … leted_demo

here you have.
complete demo.rar (552 KB)

The problem was not reproduced. I have added php file that ouputs POST parameters -they are the same in both IE9 and FF. Check attached demo
complete (588 KB)

Check it here: … erator.php

(login demo/demo)

then choose option 3 from the accordion part and submit. You will see that only on IE9 it fails to post all form inputs (the ones in accordion).

your code works but not our full version of it. What could prevent the inputs in the accodion not to be passed on $_POST only in IE9?

In our ful code, if we dactivate the accordion load JS (the 3 DIV sections are shown by default in FORM), the input fields are correctly passed in POST in IE9.

POST with IE9 with accordion activated:
array(6) { [“action”]=> string(18) “read_micronic_file” [“Submit”]=> string(7) “Process” [“field_separator”]=> string(5) “comma” [“custom_separator”]=> string(0) “” [“rack_choice”]=> string(3) “new” [“rack_code_alt”]=> string(0) “” }

POST with IE9 from accordion dactivated:
array(12) { [“scanner_chosen”]=> string(0) “” [“scanner_output”]=> string(0) “” [“file_type”]=> string(9) “universal” [“r”]=> string(1) “8” [“c”]=> string(2) “12” [“wells_number”]=> string(2) “96” [“action”]=> string(18) “read_micronic_file” [“Submit”]=> string(7) “Process” [“field_separator”]=> string(5) “comma” [“custom_separator”]=> string(0) “” [“rack_choice”]=> string(3) “new” [“rack_code_alt”]=> string(0) “” }

The 6 last inputs are outside the accordion

What could prevent the inputs in the accodion not to be passed on $_POST only in IE9?

We do not have any ideas. As you could see the demo, which you attached to previous post, worked perfectly. So, possibly the problem is somewhere in your code.

Check it here: …

After I pressed “Process” button in your demo, the page cleared and nothing else.

I believe indeed that there is something in my code, but it only happens with IE9… the other IE7 to IE10 are ok. It is related to accordion as I told you that inactivating its load, makes the INPUT to be submited…

just compare the Process button on IE9 and FF you will see the difference in behavior (page clear vs complete post process)