...

View Full Version : Permission denied error while invoking javascript method



anand_raman
03-17-2006, 09:56 AM
Hi,

When I invoke a javascript method on the parent window of an iframe, I am getting a "Permission denied" script error. I am using IE6. While the same stuff works on another PC with IE6, its not working in mine. Is it because of some IE settings?? What could be the issue?

regards,
Anand

Kor
03-17-2006, 10:25 AM
probably the two pages (parent and the page loaded in iframe) are not from the same domain. In this case, for obvious security reasons (and of course, in all browsers) it is not possible to create a javascript relationship between them. Are u sure that it works on other computers?

liorean
03-17-2006, 11:00 AM
Are you testing it from the server in both cases, or are you testing it from a local file on your own computer? Local files are in another security zone as internet zone and therefore scripts are not by default allowed to cross that border. Or indeed, per default they may not even run at all in local zone.

This is because Microsoft reasons like this:
- This file can act as an executable.
- It's run as the user and thus has all the user's privileges.
- The user thinks of it as a document, not as an executable.
- That is, the user expects it to have full user privileges as a document.
- But the user don't expect it to be an executable at all.
- So it would be a security hole to give it the user's privileges as an executable.

In short, document type files downloaded from the net shouldn't be given any raised privileges just from being downloaded (the original source is still not trusted), because the user thinks of them as documents and not executables.

anand_raman
03-18-2006, 09:07 AM
I have deployed the JSP containing the iframe in my local tomcat server. The iframe serves as a container for a JSP page containing an applet. From the applet, I invoke a javascript method thats in the iframe which inturn invokes a method in the iframe's parent.

Actually, this error occurs only in my machine(where the server runs). When I try it from a different PC, it doesn't occur. Even from another machine, I access the JSP through our coorporate Intranet. Is the other machine in a different security zone as mine?

_Aerospace_Eng_
03-18-2006, 09:10 AM
It could be. Users and/or you may have set that computer up differently when it came to internet zones.

anand_raman
03-20-2006, 10:05 AM
Hi,

I deployed the JSP in another PC and tried it from my PC. In this case its working. On the other hand, if I try it from that PC itself it isn't. The Permission denied error pops up. So, the issue has something to do with running the server and client(browser) in the same machine.. I tried adding local host as a Trusted site. Even then the same issue occurs :(

regards,
Anand



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum