attachObject does not post data in form serialize


I am using dhxWins.window(“w1”).attachObject to attach an html div to a window…
Once this window is opened I have to do some ajax calls on modifying fields in the window.
For this I use jquery $(“#” +formName ).serialize().
When I do this the html div that is attached to the window does not get submitted. The rest of the form elements are correctly serialized.
How do I fix this issue ?
Due to this I am unable to use dhtmlx windows for rendering of HTML content.

Please suggest.

Could you provide completed demo to inspect the issue locally? … pport.html
You can send it on with link to this topic

Hi Darya,

PFA the sample program that highlights this issue.
Upon click of ajax button the first time all 4 input fields are submitted whereas post dhtmlx window being opened fields that are in the window are not submitted.
Even though the fields are still part of the document.

Thanks & Regards,
Neha Mehta (156 KB)


That’s correct behaviour, after attachWindow() called,

detached from parent node and attached to a window, i.e. it stops be part of , that’s why it becomes invisible for serizlize.

Devide into two forms and concat two serialize returned value, or even better to use dhtmlxForm, it can be splitted easily.

This demo is for 4.x but this functioanlity should work in 3.6 … mplex.html

Is there any way that I can still retain this object as part of the previous form even while it is attached to the window ?
I will not be able to change my code to use dhtmlx form etc.
How do I get the window (html) content as innerHTML ? I can then append this to the existing ProposalForm temporarily before serializing.

When I just alert the windows innerHTML it still returns me the old values on the form and not the modified values on the open window…
i.e. if I do a
document.getElementById(‘nomineeObj’).innerHTML I still see the values at the time of attaching the content to the window and not the edited values.
If I can get the HTML then I can continue with my current logic.


to access window’s atatched html:

but you already have

attached, you can:

If you wish continue using DHTMLX I strongly recommend you update to latest version.