attachObject does not post data in form serialize

Hi,

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.
Thanks.

Hi
Could you provide completed demo to inspect the issue locally?
docs.dhtmlx.com/auxiliary_docs__ … pport.html
You can send it on support@dhtmlx.com 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
attachObjectToWindow.zip (156 KB)

Hi

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
dhtmlx.com/docs/products/dhtmlxF … mplex.html

Hi,
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.

Hi

to access window’s atatched html:
w1.vs[w1.av].dhxcont.mainCont[w1.av].innerHTML

but you already have

attached, you can:
$("#nomineeObj")[0].innerHTML

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