开发者

Opera opening blank window with window.open on internal (intranet) network (tested with opera 11.50);document.write does not work

The following code works fine on www but opens a blank window in an internal network. That is, it'll work on http://www.foobar.com, but it'll die on http://myserver.foobar.com, where myserver is a private-facing web server.

<html>
  <head>
    <script Language="JavaScript">
      function OpenWindow()
        {
          var popup=window.open("","");
          popup.document.write("<H1>TEST</H1>");
        }
    </script>
  </head>
  <body>
    <input type="button" value="button" onclick="OpenWindow();">
  &l开发者_运维问答t;/body>
</html>

FYI, the code above works in IE, FireFox, Chrome, and Safari on the internal network. Only Opera (tested on version 11.50) doesn't like it. It basically ignores document.write, I think.

Is this a bug with Opera?

Thank you.


I've tried your code in Opera 11.52 running on localhost (converted to a JSP and running in a tomcat container) and it works fine.

Some things to check:

  • is your Opera set to block popups? (Ctrl+12 -> General -> Pop-ups)
  • is your Opera set to notify you when it blocks popups? (Ctrl+F12 -> Advanced -> Notifications -> Show notification for blocked pop-ups)
  • is your Opera set to block content from the domain you're having problems with, or are there "hidden" errors? (Right-click on page -> Edit site preferences...; then, look at your Pop-ups setting on General tab; tick "Open console on error" on Scripting tab; and check whether your proxy settings are correct on Network tab; finally, right-click on the page -> Block content -> Details..., and check whether anything might be blocked.
  • are your proxy settings correct (internal server seems to suggest a corporate network which is typically behind a proxy)?
  • is there a problem with your site certificate (often the case with intranet sites where you don't really need internal certificates)? (Ctrl+F12 -> Advanced -> Security -> Manage Certificates...

If it's none of the above, try posting your questions on the Opera forums, they're generally very helpful and very knowledgeable.

Cheers :-)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜