Closed Bug 182005 Opened 23 years ago Closed 23 years ago

javascript:openWindow('printPopup', ...) does nothing.

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 136195

People

(Reporter: andy, Assigned: asa)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021025 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021025 When the URL javascript:openWindow('printPopup','/quote_02/modify_cancel_res_popup.jsp?','width=650,height=500,scrollbars=yes'); associated with the web page text "CLICK HERE for a printer friendly version" (where CLICK HERE is a hyperlink), is selected (left mouse click), nothing happens. No new window is opened. No page is printed. However, using Netscape 7.0 under Windows 2000, selecting the same link opens the frame in a new window containing a [Print] button. Reproducible: Always Steps to Reproduce: 1. From www.hertz.com, navigate to an existing car reservation. 2. Left click on the "CLICK HERE for a printer friendly version" link. Actual Results: Nothing. Expected Results: Opened a new "printer-friendly" window.
Are you blocking unrequested popups? If so, what happens when you turn that off?
In the meantime, reassigning to Browser-General. This is not a JavaScript Engine issue.
Assignee: rogerl → asa
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → asa
Boris asked: Are you blocking unrequested popups? I don't know. I periodically block images from some servers but I don't recall blocking popups. How do I check?
preferences > advanced > scripts and windows, the unrequested windows option.
If I enable "Allow scripts to open unrequested windows," the openWindow operation succeeds. This begs the question: why does this option not only allow solicited windows ("Click here for a printer friendly version") to be opened, but also unsolicited windows?
The problem is that the code on the site is not distinguishable from a popup... when you click on that link, instead of opening a window they set a timeout to open the window in X milliseconds. When popup blocking is enabled, we block windows opening from timeouts (otherwise the page could just set a timeout from the onload handler and have the window pop up after the page is fully loaded, making it look like it's not an onload popup). We have other bugs on this...
Whiteboard: DUPEME
*** Bug 185076 has been marked as a duplicate of this bug. ***
Confirming report with Mozilla trunk binary 20021204xx on WinNT. For example, when you activate popup blocking, the "phone" link no longer works. The phone link calls: javascript:openWindow('contactPopup','/customer_10/contactus/contactus_popup1.js p','width=550,height=520,scrollbars=yes'); In http://www.hertz.com/help_11/faq/faqs_body.jsp, we have: function openWindow(name, url, attributes) { var w = null; var wait = 0; var d = new Date; if (winIsOpen[name] && !window.focus) { wait = 500; window.open('', name, attributes).close(); winIsOpen[name] = false; } setTimeout("w = window.open('" + url + "', '" + name + "', '" + attributes +"')", wait); winIsOpen[name] = true; } As Boris explained, it's the fact they open the window via a setTimeout() that's causing the problem. The pref is blocking that. I will attach a reduced testcase below showing that -
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file Reduced testcase
Found the original bug this one is a duplicate of: bug 136195 Open Unrequested Windows pref blocks window.open() after setTimeout *** This bug has been marked as a duplicate of 136195 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: