开发者

Why does IE8 remove the Uri fragment (#myvar=1234) from window.open?

I have an issue opening a popup window using Javascript that only seems to occur in IE 8 (8.0.7600)

I'm trying to window.open a uri with a fragment, eg:

http://davidlaing.com#UserName=CC735158

If I past this into the address bar; it works correctly (javascript on the loaded page can access the uri fragment).

However, if I try to open the same uri from javascript:

window.open("http://davidlaing.com#UserName=CC735158",'','');

the window is opened up without the fragment (that is, the address bar in the popup window shows only http://davidlaing.com, and the javascript on the loaded page cannot see any Uri fragment)

The same Javascript works correctly from other browsers (IE9, FF6, Chrome). I'm pretty sure its not the popup blocker, since a window is "popped up", it j开发者_开发问答ust has a url without the fragment.

Any pointers as to what might be wrong and how to fix it would be much appreciated.


It seems to be a problem with your build version of IE8.

I can confirm that IE 8.0.6001.18702 retains the hash fragment of a URI when opened in a javascript window.open("http://davidlaing.com#UserName=CC735158",'','');

FYI: I've used the XP IE6 VPC (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11575) and immediately upgraded to IE8 with the shortcut that Microsoft thoughtfully left on the desktop.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜