After login I have function which gets control.
function formLoginSubmit() {
if (typeof window.formLoginSubmit_custom != 'undefined') {
window.formLoginSubmit_custom();
}
location.href = '/';
}
And in function formLoginSubmit_custom()
I have to do some operations with opening Iframes.
The problem is that:
- I can't modify
formLoginSubmit
(don't ask it's just a task I have to do) - Before I've done all operations with my iframes document starts redirecting
because of this:
location.href = '/';
So how can I stop executing code asyncronously
And let my formLoginSubmit_custom()
function finish all the operations before changing
location.href
What are my options?