Boxing Class - Debt Consolidation - Expekt bonuses - Flash Games - Find jobs

PDA

View Full Version : firefox redirect script with wordpress


tomcromp
Aug 20th 2008, 1:23 pm
Hello added a firefox redirect script to my site but when i view the site in firefox it just keeps refreshing.
The code is:
<html>
<script>
if(navigator.userAgent.indexOf("Firefox") != -1)
{
window.location = "http://www.watch-movies-online.co.uk";
}
else
{
window.location = "http://www.mozilla.org/products/firefox/";
}
</script>
</html>
Any one know whats wrong?

Cheers
Tom

xlcho
Aug 21st 2008, 1:09 am
This is what happens - you've opened the page (http://www.watch-movies-online.co.uk) and you are using firefox - the if statement is true and you redirect over and over again to the same page. This will never stop. Get rid of the first redirection.