Please help me understand why my code does not redirect to a specific link.
On the page http://myhost.ru/brands/ there is something like this script (I quote a part)
console.log(hostnameStr); // 'http://myhost.ru' console.log(pathStr); // '/brands' console.log(brandStr); // '/BlackBerry' alert(hostnameStr + pathStr + brandStr); document.location.href = hostnameStr + pathStr + brandStr;
Before this code, I define
brandStr . Then, as you can see, I bring them to the console and to the modal window. At the same time the address is shown correct
But the last line redirects to about that address.
According to my idea, the redirection should occur at such an address.