I am developing a javascript application which – among a lot of other controls – contains a button. When clicking this button I need to open a new window with an URL based on some selections made in the control and this I have made with a simple code
window.open(myurl);
The generated URL could end up like this “domain.xx/page#anchor”, this works as expected in FF, but IE totally ignores the anchor – the page is not correct positioned and the anchor is not even shown in the URL.
I can solve this writing my code like this
var test = window.open();
test.location.href = myurl;
the codes opens the window as expected, but inserting the URL and loading the page is very slow and therefore gives a bad user experience.
Any ideas how to make this better?
Last time I targeted IE (which is quite a while ago) the trick was to have a
and do
on click.