I want to call func which in iframe , from parent. If the func is in parent I could call it like : parent.func(); but I want to call func which is in iframe and I want to call it from parent? js says I could not find func? How can I call it?
thanks
I want to call func which in iframe , from parent. If the func is in parent I could call it like : parent.func(); but I want to call func which is in iframe and I want to call it from parent? js says I could not find func? How can I call it?
thanks
Try either
window.frames['childFrame'].func();
or
document.getElementById('childFrame').contentWindow.func();
You can do like this,
document.getElementById('frame').contentWindow.helloWorld();
Ref : How to call javascript function specified in a child <frame>