GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes Multiple frames + Access is denied 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 "Multiple frames + Access is denied" Watch "Multiple frames + Access is denied" New topic
Author

Multiple frames + Access is denied

Reese Doherty
Greenhorn

Joined: Dec 07, 2006
Posts: 8
Hi,

My html page is comprised of two frames both pint to secure URL's. When I attempt calling any functions on the document object via JS I get an Access is denied error in IE. How could I overcome this does anyone know? Is this happening becaus I am pointing to https URL's?

Thanks
Roger F. Gay
Ranch Hand

Joined: Feb 16, 2007
Posts: 376
Thanks for the question. I meant to write up the same one, but haven't found the time. I had frame interactions working quite well before, including (before Ajax) doing ajax through iframes. (Capital A indicates official Ajax.) I'm now running IE 7 and things do not seem to be working as before; at least not my latest attempt to use an iframe for a cheap and dirty trick.

I'd post code, but I'd probably have to post a lot of it. I went through quite a bit of trial and error. Maybe you could post some code to get this started.


Correlation does not prove causality.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not access frames before they are full loaded.
You can no access from http to https.
You can not access other domains.
You can not access subdomais. (well you might, different story)

Eric
Steve Swett
Greenhorn

Joined: Apr 27, 2007
Posts: 2
I'm currently experiencing a similar problem. In general, here's what I have:

1. A document with an anchor tag in it. This document contains a reference to an external js file. There are no js functions built into the document.

2. When the link is clicked, a js function is called to create a new window, keeping a handle to it in a global reference. The click action also fires off an Ajax request.

3. The function that receives the Ajax response adds a FORM to the document in the second window, targeting the response to itself (the second window). (Creating a new window in advance of the Ajax request/reponse is done to avoid a popup blocker.)

Both windows/pages are on the same domain. No JS functions exist in the window opened in step #2 above.

My problem is that the following Javascript error is given -- but only in Firefox (ver 1.5.0.11):

"uncaught exception: Permission denied to get property Window.timerId"

Firefox does not provide a statement # for the error, and I've been unable to catch it with a try/catch block.

My global variable for the second window is defined like this:



Smattered throughout a few different functions in the external js file are the following various references to the "ssoWindow" object:



The code WORKS just fine. It's just that it shows a Javascript error in the lower right corner when run on FireFox. When run from IE 7, it runs fine and with no Javascript errors.

One other clue: the only time the error shows up is when the process flows through using a GET -- which hints that it might be related to the following statement (but I don't think I could trap the error there):




If you know what might be causing this problem, please let me know. Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

Welcome to the ranch, but please do not hijack other people's posts with your own questions. Please repost your question to a new topic.
[ April 27, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: Multiple frames + Access is denied