Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1219
  • Last Modified:

Access Denied Error

Hi,

I have current designed a site that run using asp and javascript.
It is working fine on my IIS. but when i transfer it to the site i get a access denied error.
I tracked down the line of code and it is happening in javascript section provided by "coolmenu".

Here is the line:
  if(top.name==self.name){

Can anyon help.

PS the site is an intranet site.
0
cossy74
Asked:
cossy74
  • 3
  • 2
1 Solution
 
GwynforWebCommented:
The pages in the frames are in diffrent servers, you can not do this unless they are on the same server. Or use activeX
0
 
GwynforWebCommented:
Hold on here  I think I have misunderstood the question. I gather you are trying to see if a frame is the top frame, what about   if (this.parent)
0
 
JakobACommented:
Your frameset is beening loaded from the site; but the page adress in the frameset frames still point to your IIS server.
so the two pages do not come from the same server as GwynforWeb point out that they should.

regards JakobA
0
 
GwynforWebCommented:
I have not tried it but if (this.parent) might work as techniqually you have not tried to access the DOM of the top frame which you can only if they are from the same server.
0
 
JakobACommented:
The genereal rule in javascript is that when there is no surrounding frame the properties .parent and .top should point to the page itself. Thus  if(self.parent)  will always be true.

instead you could use:
  if ( self == self.parent ) {  // if there is no surrounding frameset
       // do whatever.
  }
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

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