Support

Home Forums Event Espresso Premium Passing variables from the embedded iFrame to event and checkout pages .

Passing variables from the embedded iFrame to event and checkout pages .

Posted: July 22, 2015 at 1:39 am

Viewing 3 reply threads


Clement Nicolaescu

July 22, 2015 at 1:39 am

Hello,

EE4

Please point me into the right direction for how I should achieve this .
I need it for affiliate system integration purpose.

So, we need to specify 1-2 variables into the embedding iFrame url .

Then, when the visitor hit the submit button we need those variables to be passed to the EventEspresso page so the affiliate script within the page will create the affiliate cookie accordingly .

Can you please give me a hint about the file to look into for that as the EE structure seems very complex to me.

Thank you very much,


Dean

July 22, 2015 at 3:01 am

Hi,

If the iframe is on a different site (domain) you will struggle with this as browsers don’t allow cross site scripting (it’s a security risk) – https://en.wikipedia.org/wiki/Same-origin_policy

The only way I can see this working would be to add variables to the Iframe URL and then retrieve the URL from the parent page: http://stackoverflow.com/questions/26657826/how-can-i-pass-a-variable-from-iframe-to-a-parent-window

Detecting the change will be hard, and maybe impossible if you don’t control both sites code, and would involve some in depth JavaScript coding.

If you are not code savvy, I would suggest contacting a developer for advice and assistance with this, as it will likely get complex if it is even possible to do.


Clement Nicolaescu

July 22, 2015 at 9:36 am

Thank you, Dean

I was thinking at the “add variables to the Iframe URL” solution.


Dean

July 23, 2015 at 2:30 am

No problem. Depending on your set up you may also want to consider using the API, though it’s a little more in depth: https://eventespresso.com/2015/07/event-espresso-4-rest-api-add-on-available/

Viewing 3 reply threads

The support post ‘Passing variables from the embedded iFrame to event and checkout pages .’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso