Do I need to add easyXDM provider to my application that is embedded via an IFrame?

117 views
Skip to first unread message

andiw...@gmail.com

unread,
Apr 11, 2016, 9:30:36 PM4/11/16
to easyxdm, Andreas Kleiber
I have Website A and Website B.

Website A (www.website-a.com) loads an application of Website B (www.website-b.com) in an IFrame.
Website B needs to make a post request to www.website-a.com/cartAdd with some post data.
Due to same origin policy this is not possible via a normal JavaScript XHR. So instead I want to use easyXDM to send a message from the application in the IFrame to Website A.

What is the way to implement the easyXDM provider?
Will the provider just be an extra page/script that sits on www.website-b.com/provider or do I have to add easyXDM to the application on Website B and load Website B via the easyXDM consumer and use the container property to actually show the application?

Øyvind Sean Kinsey

unread,
Apr 12, 2016, 1:03:54 AM4/12/16
to easyxdm, Andreas Kleiber
 or do I have to add easyXDM to the application on Website B and load Website B via the easyXDM consumer and use the container property to actually show the application?

This is the general approach, although you could go deeper and have B  load a provider from A which then talks to its `parent.parent`. Similarly you can have A load a provider from B which then loads the real app from B in an iframe, and this talks to its parent to get things done.
-sean

--
You received this message because you are subscribed to the Google Groups "easyxdm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to easyxdm+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages