Solved

Access Denied Error

Posted on 2003-11-24
5
1,212 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

809 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