I have a small problem. For some weird reason any attempt to change url via javascript, be it window.open, window.location, window.location.href, etc. doesnt move to the desired page, but adds it to end of the url. It doesnt even matter what IE version, from 6-8
E.g.
http://localhost/blabla/produkt/philips-fc-861501-animal-care/3639
ends in
http://localhost/blabla/produkt/philips-fc-861501-animal-care/added-by-javascript
I have no idea why this happens…
On this page
http://localhost/blabla/objednat-tovar?step=deal-detail
it works as intended.
Any help is appreciated…
EDIT:
Some code.
I am on
http://localhost/blabla/produkt/philips-fc-861501-animal-care/3639
// code
<a href="javascript:aaa(\'new_location\');" title="test">test</a>
function aaa(where) {
window.location = where;
}
Ends in
http://localhost/blabla/produkt/philips-fc-861501-animal-care/new_location
Same thing happens with window.location.href, window.open and only in IEs
I’m guessing that the browser tries to parse the location as a URL and if it fails then, presumably, it does whatever it wants (IE seems to append the string to the current location). For example: