> If you are on the same domain, I would go with:
>
> Parent window with iframe
> <input type="text" id="meh" value="nada">
>
>
> page in iframe
> window.parent.document.getElementById('meh').value= "zoinks";
>
> (changes nada to zoinks)
Hi, sorry I don't know JS really. I only have a regular web page (not an iFrame) and this page shows the game inside the iFrame. I need to somehow send a variable (if the player won or lost) to the parent page from the game. How will it look in C3 events?
This example requires some JS through the add script method, rather old fashioned dom approach. Gave the construct input an ID, gets fetched on button press and send to a parent, will give an error if not there.
You can change the input in the app, then press a button
boomtanium.com/construct/test/iframe/pagewithframe.html
Here are all the files packaged:
- html page with iframe (pagewithframe.html Make sure to update the 2 URLs in the page to match your server.
-php response page
-c3p file, and exported
dropbox.com/s/e0pw2pmpolwui9t/iframe.zip
unzip, updateurls in html page, upload the entire folder, or its contents to a desired server and open yoursite.com/pagewithframe.html in a browser.