File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Randon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Randon "Access is Denied" error" Watch "Randon "Access is Denied" error" New topic
Author

Randon "Access is Denied" error

Ram Thirumangalam
Greenhorn

Joined: Aug 28, 2003
Posts: 20
Hi
I want to write to a frame in the parent window from a child window which calls a javascript function and uses the document.write but get an 'access is denied' error. This error occurs randomly. sometimes, it works fine and some times I get this error. Before writing to that frame, I do a href.location = "about:blank" and a location.replace() method on that frame (I do this becos that frame loads PDF documents generated dynamically by the server and with Adobe 7, this script doesnt work...so had to do this workaround).

I am not sure if this is a cross-domain error. The child window contents are generated by the server using a servlet and so is it possible that when I try to access the "about.blank" page that I just replaced in the target frame might not be generated by the server?

Any suggestions are greatly appreciated. I am clueless as to what would be causing this.

Please help!

Thanks,

Here is the javascript code:

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
doing the about:blank is probably what is causing the problem. I know you can not do it in https pages. I normally have a regualr html page and call that with no tags.

Eric
 
Don't get me started about those stupid light bulbs.
 
subject: Randon "Access is Denied" error
 
Similar Threads
can't get my child window to close and reload the parent.
java Script Program
Closing Child Window from frameset
How to control browser instance per URL?
disable hyper links conditionally