• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 628
  • Last Modified:

Permission Denied

Hello:

I am creating a quoting system where there are four frames with fields that rely on each other. The problem being that when I try and change a field from another frame, using Javascript I get a "Permission Denied" error. All the pages are in the same folder, the same domain but it just doesn't seem to be working.

Does anyone know how to solve this problem, or some workaround for it?

Thanks,
Tym.
0
prosperion
Asked:
prosperion
  • 3
  • 2
  • 2
2 Solutions
 
ZvonkoSystems architectCommented:
Even when all pages are in the same folder you can get the cross domain problem.
When your window address is not the same URL host AND domain as the urls for the frames pages, then you get the problem accessing the top.frames object.
The same is also true when the top window is addressed by numeric IP address and the frame pages are symbolic DNS url addressed.

0
 
ZvonkoSystems architectCommented:
Implicite to the above: when one address is host name without domain suffix, then is the host found, but it is not same domain as same host with domain suffix.
0
 
VincentPugliaCommented:
would you mind posting a link?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
prosperionAuthor Commented:
It is on an intranet so unable to post a link, but I can give you some code... there is a lot of it... but I will give you the code where I get the permission denied stuff...

Firstly, each page loads another page using the comand onload='parent.EstimateTopRight.location.href = "EstimateTopRight.aspx?<%# UrlEstimate %>";'
I have a reference table, so if a field changes, it will update the fields that it relies upon.

Table["TLSalary"]     = [TLSalaryCalc, [[TL, "TLSuperAmt"], [TL, "TLTotalPkg"]]];
Table["TLBonus"]      = [TLBonusCalc, [[TL, "TLSuperAmt"], [TL, "TLTotalPkg"]]];
Table["TLVehAllow"]   = [TLVehAllowCalc, [[TL, "TLSuperAmt"], [TL, "TLTotalPkg"]]];
Table["TLOtherAllow"] = [TLOtherAllowCalc, [[TL, "TLSuperAmt"], [TL, "TLTotalPkg"]]];

and what happens is it finds the element TLTotalPkg which is in a different frame....

Does this help at all?
0
 
prosperionAuthor Commented:
The function I use to recurse through them is:

      Table[elem.id][0]();
      for(var i = 0; i < Table[elem.id][1].length; i++)
            UpdateRefs(Table[elem.id][1][i][0].getElementById(Table[elem.id][1][i][1]));

I get the permission denied error only when trying to access somethign in a different frame.
0
 
prosperionAuthor Commented:
Okay I have checked to see the addresses of all the pages... they are as following

Frameset: http://localhost/fi/Estimate.aspx
Frame1: http://localhost/fi/EstimateTopLeft.aspx
Frame2: http://localhost/fi/EstimateTopRight.aspx
Frame3: http://localhost/fi/EstimateBottomLeft.aspx
Frame4: http://localhost/fi/EstimateBottomRight.aspx

Is there are way that they can have these addresses, yet be from different domains?
0
 
VincentPugliaCommented:
afaik, no.  Have you checked what the html produced by the asp looks like?  Perhaps it is screwing up the names (creating them out of bounds, etc.)?

Vinny
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now