Location.href Fire Fox and Mozilla Problem

January 31, 2010

Javascript Location.href Fire Fox and Mozilla problem

Problem: location.href('/products.php'); doesn’t work
Solution: location.href='/products.php';
 
Reason: location.href is a property, not a method, and you have to assign a value to it.
 
PS: It works in IE, but not Firefox because Microsoft added support for location.href('/products.php'); since so many people are trying to use it.