javascript - window.open is not working in IE8 - Stack Overflow

I am using IE8, to open a window i am using this code,window.open(url,"STO");Its working in o

I am using IE8, to open a window i am using this code,

window.open(url,"STO");

Its working in other browsers except IE8.

please tell me what is the problem with IE8? I tried turningoff popupblocker also.

I am using IE8, to open a window i am using this code,

window.open(url,"STO");

Its working in other browsers except IE8.

please tell me what is the problem with IE8? I tried turningoff popupblocker also.

Share Improve this question edited May 16, 2012 at 11:56 ratchet freak 48.2k5 gold badges74 silver badges112 bronze badges asked May 16, 2012 at 11:52 user27user27 27410 silver badges27 bronze badges 1
  • What errors are you seeing in your JS console? – Marc Commented May 16, 2012 at 11:54
Add a ment  | 

4 Answers 4

Reset to default 2

FYI: I ran into this as well. I was generating a PDF and then using window.open(url,'_blank') to open the PDF in a new window. It worked fine in IE8 in Dev and Test but, in production, the window would just automatically open and then close. I searched the net\stackoverflow but did not find a solution that actually matched the problem.

It turned out that the link to the application on the client's intranet was via IP address instead of name. IE treats sites that addressed by IP as though they are in the internet zone even if they are actually on the intranet. I had the client's admin change the link and the pop up worked just fine.

I am sure there are security settings in the different zones governing this behavior but I would not want to make the Internet Zone settings less stringent.

I have tried with this code.And It worked perfectly for me .

var w =window.open(url,'_blank');
w.location.href = url;

if you are running the same code as you've shown here then let me tell you there is nothing wrong with the code. May be your pop up blocker is on try to turn it off and then try again. You can turn it off by Tools->Internet Options-> Pricacy(tab)-> Uncheck popup blocker option. Hope it helps

Please check your URL variable

try this

window.open("goole.", "google");

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745091105a4610698.html

相关推荐

  • javascript - window.open is not working in IE8 - Stack Overflow

    I am using IE8, to open a window i am using this code,window.open(url,"STO");Its working in o

    16小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信