I have a set of control variables for my iframe history. It changes after the iframe is fully loaded (when the user clic on some link inside the iframe)
$('#iframe').load(function(){
if ((action == 'forward')) {
window.historyControl+=1;
} else {
window.historyControl-=1;
}
});
For what I'm trying to do, it works fine BUT when the user changes the iframe url BEFORE the iframe fully load then the .load()
function doesn't execute.
The same happens if I put that inside vanilla javascript and call the function with the onLoad=()
parameters in the iframe.
Is there a way to execute some javascript code while the iframe load his contents?
I have no control over the iframe contents.