Login  Register

Re: two way js communications between parent and iframe content

Posted by Alessandro Vernet on Jan 20, 2011; 8:26pm
URL: https://discuss.orbeon.com/two-way-js-communications-between-parent-and-iframe-content-tp3192702p3228409.html

Assuming you have a trigger id `my-trigger`, to simulate in JavaScript
a user click on the button corresponding to that trigger, I often use:

ORBEON.util.Dom.getElementByTagName(ORBEON.util.Dom.get(id), "button").click();

Alex

On Fri, Jan 7, 2011 at 11:57 AM, DL <[hidden email]> wrote:

>
> This 3 year old thread covers my interest .. to use javascript in a parent
> wrapper page to invoke controls in an embedded xform
>
> "How can I active the button on xforms page from javacript in parent
> IFrame?"
>
> The answer was ..
>
>
>> Your code won't work because the element returned by
>> getElementById('buttonid') is a  element. Clicking the span won't cause
>> the button to be activated.
>>
>> Maybe try dispatching a DOMActivate to the button control instead. See the
>> doc here:
>>
>> http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-events
>>
>> -Erik
>
> Are there any wiki examples / tutorials I can refer to .. button in parent
> window js invokes js in iframe content to submit content of an xform to a
> database?
>
> I am using a php CMS (Wordpress or Drupal interpreted by Quercus) as the
> container for iframe embedded xforms and I want the xform controls / submit
> buttons to be in the parent window and not in the embedded xform.
>
> Conversely how can the embedded xform invoke javascript functions in the
> parent (CMS) window?
>
> i.e. parent-child js connection .. both ways?
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/two-way-js-communications-between-parent-and-iframe-content-tp3192702p3192702.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet