I’m trying a redirect on a page that goes like this:
original URL: “http://www.foo.com/products/”
js to redirect:
window.location.href = 'http://www.foo.com/dept/' + product_var + '/s?template=products/details&layoutVariation=centerbar';
*product_var = is the name of the product stored in a variable.
It is working fine on FF and Chrome, but on IE it the original url loads and it never goes to
the new one.
Is it beacuse of the params? Any suggestion?
Tried to use document.location, but it didn’t work either.
Thanks for your attention!
Answering my own question. 🙂
The code has this huge declaration of products, image, text, etcs organized this way:
Turns out the problem was just a COMMA at the end of one of these declarations. IE just didn’t want to continue the script and redirect. Weird thing is, it haven’t showed any error…
Thanks all you guys and remember: one missing or extra comma can lead to a huge amount of waste of dev time. Always take a good look at your codes. 😉
Cheers!