I have a modal dialog which contain form and hidden iframe to which form is submitted. The result of submission is file to download. I need to close modal dialog as soon as download dialog is opened i.e. file is ready. I was trying to catch 'onreadystatechange' event of iframe, but after submit call changing state to 'complete' it does not trigger 'onreadystatechange' event.
Eventually, i use window.setInterval which monitoring readyState of iframe and cl开发者_如何学JAVAose modal dialog when its state == 'complete'.
the solution that using window.setInterval seems not professional to me and I am looking for better solution, I saw solution with cookies but I can't use cookies in my application.
Any help will be appreciated!
There is nothing wrong or unprofessional in using window.setInterval()
.
function Close_Popup() {
$(".modal-backdrop").remove();
$('#div_Popup1').modal('hide');
$(".modal-backdrop fade in").remove();
}
Call this function on OnClientClick="Close_div_Popup1_Popup();"
精彩评论