Window.close() is causing an about:blank pop up window to appear
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)
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?
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
I'm using Firefox 11. I tried safe mode but the same thing happens.
Honestly, I'm not interested in testing Firefox 11 any more. Why are you still supporting it?
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?
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.
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.