I\'m required to make a website function exactly the same on other browsers as it does in IE6. Part of the current code looks similar to this:
Changing the href
property will start a location load, changing it again afterwards will cancel the previous navigation.
It appears that IE6 will start the e-mail client immediately upon setting the property, then continue the javascript execution. Other browsers appear to do things differently, and the second location load will cancel the first.
I managed to work around this in Chrome with a timer, it might work for other browsers too:
function myFunc(){
location.href="mailto:test@test.com&body=Hello!";
window.setTimeout(function () { location.href="newPage.html" }, 0);
}