Login  Register

javascript events outside of form

classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

javascript events outside of form

bwallis42
327 posts
I have a form embedded in a frame (or iframe) and I need to know in the javascript outside of the form when a button has been pressed so I can refresh a list of form links elsewhere on the page.

Is this possible?

thanks
brian...
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: javascript events outside of form

Alessandro  Vernet
Administrator
5128 posts
Hi Brian,

If both the content of the iframe and container are served from the same server (same origin), then the content of the iframe can call JavaScript declared in the container.

Assuming this is the case, in the process for the said button, you can call navigate(uri = "javascript: window.parent.buttonPressed()") calling a buttonPressed() JavaScript function you declared in the parent window.

Alex

On Tue, Jun 9, 2015 at 1:47 AM, bwallis42 <[hidden email]> wrote:
I have a form embedded in a frame (or iframe) and I need to know in the
javascript outside of the form when a button has been pressed so I can
refresh a list of form links elsewhere on the page.

Is this possible?

thanks
brian...


--
View this message in context: http://discuss.orbeon.com/javascript-events-outside-of-form-tp4660046.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: javascript events outside of form

bwallis42
327 posts
Thanks for that. This works for us.

brian...
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: javascript events outside of form

Alessandro  Vernet
Administrator
5128 posts
Brian, good! And thanks for the update.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet