Solved

Access Denied Error

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now