Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by dactar on Jun 12, 2008 01:18
open dhtmlx forum
Fill a field from dhtmlxwindow to its parent dhtmlxwindow

Hellow,

I've a html page (A.html) who create a dhtmlxwindow (id='win_main') with attachURL (B.html).

In the html (B.html) I've a form :

<form id='my_form'>
<input type='text' value='nothing' name='my_field'>
</form>

and

another dhtmlxwindow (id='win_sub') with attachURL (C.html).

The question is :

How can I replace value 'nothing' by 'something' from the last html page (C.html) ?

Thanks for your answer
Answer posted by Support on Jun 12, 2008 02:07
If both windows are children of main window (A.html)
    parent.dhxWins.window("win_main")._frame.contentDocument.forms[0].my_field='something';
Answer posted on Jun 12, 2008 02:59

Thanks for your answer.

First window is child of main page (A.html)
Second window is child of the first window (B.html)

Answer posted by Support on Jun 12, 2008 07:15
>>First window is child of main page (A.html)
>>Second window is child of the first window (B.html)

In such case you can use direct approach
    parent.forms[0].my_field='something';
( from C.html , parent will point to B.html )
Answer posted by dactar on Jun 13, 2008 00:38
Thanks for your help, have a nice day :)