Solved

Access Denied Error

Posted on 2003-11-24
5
1,214 Views
Last Modified: 2008-03-06
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
Comment
Question by:cossy74
  • 3
  • 2
5 Comments
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 9815065
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
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 9815132
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
 
LVL 15

Expert Comment

by:JakobA
ID: 9815236
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
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 9815336
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
 
LVL 15

Accepted Solution

by:
JakobA earned 500 total points
ID: 9815357
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to change the colour of columns using dynamic data for google charts 3 46
Html split(text) Part2 6 21
Two decimal 5 27
Put POST values into cookies. 14 34
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question