为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Window.close() is causing an about:blank pop up window to appear

  • 7 个回答
  • 1 人有此问题
  • 7 次查看
  • 最后回复者为 keckhoff

more options

I have a page that opens a PDF upon page load. It is typically opened as a separate window from another application that needs reports to be opened.

The report page launcher, RunReport.aspx, does window.open in javascript to open the PDF report.

Then it does window.open(,'_parent',); window.close(); to close RunReport.aspx. I've tried window.close() by itself and found the result to be exactly the same. So window.open is not causing the blank pop up.

This results in the RunReport.aspx being closed but a strange "about:blank" pop up that's a tiny window appears. If I take out the window.close() then this blank pop up never appears but of course the Report launching page stays up and I don't want that either.

Interesting note:

netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite'); window.open(,'_self',); window.close(); // This will close the about:blank pop up but leave the RunReport.aspx page open.

If I try to add window.close() after it then it seems to ignore that command and the report launching page is still up.

Why does this mysterious blank pop up occur only in firefox and only if I tell it to close a window?? Can anyone explain this?

I have a page that opens a PDF upon page load. It is typically opened as a separate window from another application that needs reports to be opened. The report page launcher, RunReport.aspx, does window.open in javascript to open the PDF report. Then it does window.open('','_parent',''); window.close(); to close RunReport.aspx. I've tried window.close() by itself and found the result to be exactly the same. So window.open is not causing the blank pop up. This results in the RunReport.aspx being closed but a strange "about:blank" pop up that's a tiny window appears. If I take out the window.close() then this blank pop up never appears but of course the Report launching page stays up and I don't want that either. Interesting note: netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite'); window.open('','_self',''); window.close(); // This will close the about:blank pop up but leave the RunReport.aspx page open. If I try to add window.close() after it then it seems to ignore that command and the report launching page is still up. Why does this mysterious blank pop up occur only in firefox and only if I tell it to close a window?? Can anyone explain this?

所有回复 (7)

more options

What version of Firefox are you testing? The developers have been trimming back on privileges in recent versions.

To rule out the effects of add-ons, could you test in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: Diagnose Firefox issues using Troubleshoot Mode.

You can restart Firefox in Safe Mode using

Help > Restart with Add-ons Disabled (PDF viewer plugins will still work)

In the dialog, click "Start in Safe Mode" (not Reset)

Any difference?

more options

Note that the PrivilegeManager is no longer supported in current Firefox releases, so this may throw an error and abort the script.

  • netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
  • Bug 546848 - Remove support for enablePrivilege
more options

I'm using Firefox 11. I tried safe mode but the same thing happens.

more options

Honestly, I'm not interested in testing Firefox 11 any more. Why are you still supporting it?

more options

I am sure I could get management to move us up to the latest version if I said that would fix this problem. Do you know how to resolve it in the latest version of firefox?

more options

Hi keckhoff, you can test using the "Portable" version of Firefox 26, a third party package of Firefox designed to run from a single folder.

http://portableapps.com/apps/internet/firefox_portable

If you would like forum volunteers to take a look, please post a test case online and provide a link to it.

more options

I upgraded to the latest version of firefox and still it is failing. I think this is related to how Firefox works when you try to open a microsoft reporting services report in PDF format. I don't know why but it insists on opening a blank pop up window whose Url is "about:blank" but also opening the report.