i have iframe inside a page, and this iframe contain a submit button which will do some function.
What i want is: after the iframe submit finish, call the parent page to refresh.
i know how to refresh it:
parent.location.reload();
But i don't know how to do that after submit finish.
Use an onload
event handler on your iframe. When it fires after the submit, execute your top.location.reload
...
// In parent
window.onload = function() {
document.getElementById("MY_IFRAME").onload = function() {
top.location.reload();
}
}
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