how to refer a child iframe js function from parent code example
Example: how to access parent function from iframe
document.getElementById('targetFrame').contentWindow.targetFunction();
document.getElementById('targetFrame').contentWindow.targetFunction();