Blog

Process Orchestration Quick Tips

Quick tips: How to access the parent or child window controls using javascript?

Challenge:

We may need to invoke the embedded page controls from the parent window or parent window controls from the embedded page using javascript

Solution:

It’s much as easy as like accessing the controls in the current form. The below code will help to access it.

Access parent control from Embedded page:

var sPONumber =window.parent.thisForm.controlManager.getControlByName(‘txtPONumber’).getValue()

Access embedded page controls from parent:

var sPONumber = window.frames[0].frameElement.contentWindow.thisForm.controlManager.getControlByName(‘txtPONumber’).getValue()