First off: Everything works, but I would like to fine tune this a little.
Basically, in my FireFox addon I have this code in function A:
timervar = setTimeout(function() { quick.redirectToAnotherUrl(); },1500);
and in the redirecttoanotherurl function I have this:
window.content.location.href = FilterUrl;
The problem is the page loads before the redirect takes effect.
Is there anyway to stop the page loading totally and then redirect as normal?
I’m not sure of the browser compatibility, but maybe try
window.stop();before yoursetTimeout?For IE, you may need
document.execCommand('Stop');in addition, because as far as I know, it does not supportwindow.stop().