Copy link to clipboard
Copied
Hi - i need some help.
I have a HTML-Page (a) with four buttons in it. By clicking one of this buttons a function "callNL(value)" will called which is within this page (a) - this works.
On the same HTML-Page (a) i have an iframe with the id "ifr_unten". In this iframe a HTML-Page (b) is running. This page (b) contains my Animate animation. In this animation there is a dynamic textfield, which should show some text if i click one of the buttons of page (a). To show the text there is a function "changeLanguage(value)" which i want to call via the function "callNL(value)" from page (a).
On page (a) i use
var iframe = document.getElementById("ifr_unten");
to get access to the page which is running in the iframe. The result is: [object HTMLiFrameElement]
To call the function within the animation i use then
var iframeDocument = iframe.contentDocument;
iframeDocument.defaultView.changeLanguage(indx);
But as result i get always NULL.
What to do? Can someone please help me.
Copy link to clipboard
Copied
Hi.
The link below is an example of how to handle communication between an iframe and a page.
https://github.com/joao-cesar/adobe/tree/master/animate%20cc/html5_canvas/communication_between_ifra...
Please let us know if this reference is helpful in your case.
Regards,
JC
Copy link to clipboard
Copied
Thanks a lot JoãoCésar
I will download this and check it this evening 🙂
Copy link to clipboard
Copied
It helped! Thanks a lot!
Copy link to clipboard
Copied
You're welcome!