I have a page with iframe. The iframe has a submit button. When I click the submit button, I want to update the parent window. This is what I have done so far and it works (javascript is in the parent window):
var myFrame = $('iframe');
myFrame.load(function() {
myFrame.contents().find('#publish').click(function() {
myFrame.load(function() {
location.reload();
});
});
});
The code is working. But I believe that reloading the iframe is not needed. Is there a better way to detect when a βsendβ is complete?
(I cannot reload the page with only "onclick" or the relay with any delay. I must be sure that the form submission is completed)
Hakan source
share