Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Larry Hamlet on Jul 19, 2009 16:37
open dhtmlx forum
Manipulating Combo Text Value From A Different Layout Window

I have a dhtmlxLayout (5H).
In frame "C" I have a Combo - Showing the pre-Selected ComboText.
The Combo resides in an HTML Table and DIV implemented via attachURLObject().
Now I change something in Frame "D" and I want the Combo Text in Frame "C" to update with the New Information.
How is the best done?
Answer posted by Alex (support) on Jul 20, 2009 03:21

In order to call functions of layout cells you can use the following approach:

dhxLayout.cells(cell_id).window._frame.contentWindow.someFunction();

to call parent methods from iframe - a known JS approach: 

parent.someFunction();

Answer posted by Larry Hamlet on Jul 20, 2009 09:20

Thanks!  I got it to work best from JavaScript insde dhxLayout.cells('d') HTML by using the following:

  //Get The Remote Layout Window's myCombo Actual Option Value
  combosActualValue=parent.dhxLayout.cells('c').window._frame.contentWindow.myCombo.getActualValue();
  //Update The Actual Option
  parent.dhxLayout.cells('c').window._frame.contentWindow.myCombo.updateOption(combosActualValue,combosActualValue,newComboText,'');
  //Update The User's View Of The Selected Option
  parent.dhxLayout.cells('c').window._frame.contentWindow.myCombo.setComboValue(combosActualValue);