Is there a way to call a JavaScript function that is inside an IFrame from the parent?
That depends on the contents of the IFrame. If the content is from another domain then you're out of luck, as most modern browsers have closed that loophole for cross-site attacks.
However, if the content is from the SAME domain then you can use it as it were simply another method on the IFrame window object. If I recall correctly you can use something like window.frames["_your_IFrame_ID_"].window.functionOrMethodName().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With