Solved

Access Denied Error

Posted on 2003-11-24
5
1,213 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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 print dynamic Google map and directions? 1 23
How can I make a javascript to show drop down 4 22
how can i get the string decoded ? 2 28
Hide Table in merge 3 30
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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