Closed Bug 1202197 Opened 9 years ago Closed 9 years ago

Not able to print iframe

Categories

(Core :: Security, defect)

39 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 911444

People

(Reporter: amolshetkar11, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36

Steps to reproduce:

printing only iframe from webpage. But getting error on console as access denied to document 

code :
window.frames["iframe"].focus();
window.frames["iframe"].print();





Expected results:

should allow to print iframe from browser.
Could you attach a testcase, please.
Flags: needinfo?(amolshetkar11)
(In reply to Aol11 from comment #0)
> User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
> like Gecko) Chrome/45.0.2454.85 Safari/537.36

 Steps to reproduce:

I have used IFrame to display the PDF and the PDF is located on same server. I have created print button and written javascript code to print iframe. But I received following error in console Error: Permission denied to access property "print" window.frames[iframeId].print();. But it is working fine on other browsers.
 
 javascript code :
 window.frames["iframe"].focus();
 window.frames["iframe"].print();

> 
> 
> 
> 
> Expected results:
> 
> should allow to print iframe from browser.
Flags: needinfo?(amolshetkar11)
We need the source code, just attach a minimal HTML file (you can attach to Bugzilla a sample PDF as resource on the same server) to reproduce the issue.
Flags: needinfo?(amolshetkar11)
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(amolshetkar11)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.