Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Gives Access Denied when printing PDF report which is in another frame.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to print the another frame by specifying the name of the
frame,and in that frame I am generating a report in PDF/HTML.
But It gives access is denied error.
what I am doing is in Javascript is as follows:
function printReport()
{
window.parent.Main.focus();
window.parent.Main.print();
}
where Main is my second frame on which my report is generated.
I am using Web logic server for my JSP pages and for reports Oracle Report writer 6i.
I also tried it by placing both my reports and JSP page(in which I have written a script) on the same machine,but my prob remains as it is.

So If You have any idea about the error, just inform me urgently.
--------------
Ya you r right its the problem of security,but have u any idea how can i change the security at client side as this error comes from the javascript written for client side validation.
[ April 24, 2002: Message edited by: Ashwani Yadav ]
 
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are referring to the Javascript "access denied" error, this can occur when a page tries to access a frame that contains a page served up from a different server. This is not allowed (think of the security implications).
hth,
bear
 
Bear Bibeault
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is indeed the case (in which a page on one domain wants to load a page from another into a peer frame), one way around this could be to write a servlet or JSP that utilizes a URLConnection to suck in the content of the "foreign" page and write it to the response. The servlet or JSP would exist within the same domain of the originating page, so you would avoid the "cross-domain" access problem.
hth,
bear
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!