window.location on a Mac
window.location = "https://snook.ca/';
However, Safari and IE 5.2 for Mac (at least on OSX) behave a little differently than browsers on the PC. I put together this basic test page in order to see which scenarios work and which don't.
Tests 2, 4 and 5 work but 1 and 3 don't. And you can probably see why. In 1 and 3, we set the
window.location to a new URL. This would normally redirect the user to the new page. But after the onclick event, it runs the URL contained in the href and overrides the redirect. In this case, the # keeps the page from redirecting altogether. By putting
return false; we stop the href from being processed altogether.
Thanks! I was stumped for a while as to why my JS was failing on stupid Macs. This helped.
Thank you! I was pounding my head against the wall on this one.
Thank you so much!!! This seriously was giving major headaches!!!
Thanks a million. I would have had a mjor problem on my hands without this information.
Thanks! this helped out a ton, I was stumped...and blaming it on MACs! ;)
Thank you sooooo much for posting this. It really helped me a lot!!!!
now that's what the web is for. i was almost weeping for a solution. standardisation means i have to write better code!
This information is very very helpful. It works perfectly with Mac IE5.2. But it does NOT work with Safari on Mac. I would appreciate it if you can give me some suggestion about Safari.
zadar: look into