I want to call a function in Iframe from parent window . as
var iframe = document.getElementById("myframe");
if (iframe) {
var iframeContent = (iframe.contentWindow || iframe.contentDocument);
iframeContent.targetFunction();
}
but it doesn't work .
Since the content of Iframe is added dynamically (All contents are added in iframe on demand even js file
);
I had followed this
Invoking JavaScript code in an iframe from the parent page
There is any way to solve this problem ?