The problem is as follows. When I enter to some page from my site clicking the link (FF browser), I am redirected to an unwanted site. And some window pops-up where you can choose whether to stay or leave the site. When you click I want to stay, the window pops-up over again. This happens because the site have built in the following script:
var exit=true; window.onbeforeunload = function () {
var goto_url = 'http://some site';
if(exit==true){
exit=false; window.location.replace(goto_url);
return " Special Offer: Get 2 For 1 Price!"; } }
This not happens when I use IE8 browser, then everything is all right. Is there possible any solution in javascript code? Otherwise, can I block unwanted redirecting when enter to external site. I thing this must be some bug associated with FF browser.
Can somebody Help me with this problem, because I tried to find solution everywhere wihtout no luck.
“NoScript” extension is not best solution for me because I want to implement some code on my own site and prevent my users with that redirecting. Is there any other way?
thanks