learn java
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

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Randon "Access is Denied" error" Watch "Randon "Access is Denied" error" New topic

Randon "Access is Denied" error

Ram Thirumangalam

Joined: Aug 28, 2003
Posts: 20
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!


Here is the javascript code:

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15383
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.

I agree. Here's the link: http://aspose.com/file-tools
subject: Randon "Access is Denied" error