The command:
document.location.href="www.google.com"
Does not change the current web page in the google chrome browser. The command does transfer the page in the IE9 browser.
Why would this command work for IE9 but not for chrome?
The command:
document.location.href="www.google.com"
Does not change the current web page in the google chrome browser. The command does transfer the page in the IE9 browser.
Why would this command work for IE9 but not for chrome?
You need to add the protocol:
document.location.href="http://www.google.com";
An alternative solution is to add this line before document.location.href
window.event.returnValue = false;
Source: document.location does not change the webpage in IE9?