473,795 Members | 3,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Denied Error in Frames

32 New Member
Hi,
This is my first message to this forum.I am facing one problem in frames.when i am trying to access child frame from parent frame i am getting "Access Denied Error".i know the reason bcz i am trying to access the frame in different domain.is there any way to tackle this problem

my code:

parent frame:
<html>
<script>
function displayURL(){
alert("child frame URL="+self.chil dframe1.locatio n.href);
// above line i am getting the 'Access Denied Error'
}
</script>
<frameset id="mainframe" rows="100%,*" border="0">
<frame id="childframe1 " name="childfram e1" src="child1.php " onload="display URL()">
</html>

child frame: child1.php:
<html>
<script type="text/javascript">
function displaygoogle() {
parent.childfra me1.location.hr ef="http://www.google.com" ;
}
</script>
<body>
<a href="javascrip t:displaygoogle ();">Display Google</a>
</body>
</html>

When the page is getting loaded for first time.the alert box is displaying as "child frame URL=http://www.ABC.com/child1.php". suppose when i click the 'Display google' link in child frame,the google web site is displaying in my child frame but the alert box is not displaying "it's telling Access Denied Error".

A.suresh
Feb 15 '07 #1
6 3464
suresh_nsnguys
32 New Member
Hi,
This is my first message to this forum.I am facing one problem in frames.when i am trying to access child frame from parent frame i am getting "Access Denied Error".i know the reason bcz i am trying to access the frame in different domain.is there any way to tackle this problem

my code:

parent frame:

<html>
<script>
function displayURL(){
self.childframe 1.location.href ="http://www.google.com" ;
alert("child frame URL="+self.chil dframe1.locatio n.href);
// this line i am getting the 'Access Denied Error'
}
</script>
<frameset id="mainframe" rows="100%,*" border="0">
<frame id="childframe1 " name="childfram e1" src="child1.php ">
</html>

child frame:(child1.p hp):

<html>
<body>
<a href="javascrip t:parent.displa yURL();">Displa y Google</a>
</body>
</html>

When the page is getting loaded for first time.the alert box is displaying with "http://www.ABC.com/child1.php". suppose when i click the 'Display google ' link in child frame,the google web site is displaying in my child frame but the alert box is not displaying "it's telling Access Denied Error".
Feb 15 '07 #2
b1randon
171 Recognized Expert New Member
Hi,
This is my first message to this forum.I am facing one problem in frames.when i am trying to access child frame from parent frame i am getting "Access Denied Error".i know the reason bcz i am trying to access the frame in different domain.is there any way to tackle this problem

my code:

parent frame:

<html>
<script>
function displayURL(){
self.childframe 1.location.href ="http://www.google.com" ;
alert("child frame URL="+self.chil dframe1.locatio n.href);
// this line i am getting the 'Access Denied Error'
}
</script>
<frameset id="mainframe" rows="100%,*" border="0">
<frame id="childframe1 " name="childfram e1" src="child1.php ">
</html>

child frame:(child1.p hp):

<html>
<body>
<a href="javascrip t:parent.displa yURL();">Displa y Google</a>
</body>
</html>

When the page is getting loaded for first time.the alert box is displaying with "http://www.ABC.com/child1.php". suppose when i click the 'Display google ' link in child frame,the google web site is displaying in my child frame but the alert box is not displaying "it's telling Access Denied Error".
If you want to cross domains you will have to do it from your server as nearly every browser will not allow this because it is such a security risk.
Feb 15 '07 #3
suresh_nsnguys
32 New Member
Hello sir,
Can you ellaborate your idea briefly.
A.suresh
Feb 16 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
Does this issue only occur in IE? See this KB article.
Feb 16 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
Merged threads.
Feb 16 '07 #6
suresh_nsnguys
32 New Member
Can any help me this isue.

i am setting self.childframe 1.location.href ="http://www.google.com" ;

from parent frame.whether the above fn will replace the child frame src value to 'google.com' .
bcz After displaying the google.com website in my child frame.i checked this option alert("frame HTML="+document .getElementsByT agName('framese t')[0].innerHTML);

Its displaying the original frame src that is "frame HTML=<frame id='childframe1 ' src='child.php' ></frameset>".
Feb 17 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
8601
by: Brian | last post by:
Hi all, So, I posted a question about a DOM inspector for IE (mozilla comes with one, which is pretty nice). Since I got no reply, I wrote my own, which works pretty well. It is laid out like the mozilla one, but isnt quite as nice, because I did not want to spend too much time with it. Anyways, I implemented it with frames, where one frame contains the source
2
5429
by: Sergio del Amo | last post by:
Hi, I implemented a Web-Site based in remote scripting with hidden frames. I am using Javascript to provide dynamic functionality. In the machine's local server works perfectly but when i uploaded to my hosting site i obtain: Error "Access Denied" Code:0 The function where i get the error is the next. Exactly in the line 31 27: function serverLoad(pX,rX)
0
3539
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the original question, the subject line is: ADODB.NET and "Access Denied" I have an ASP.NET page writtein in VB that uses ADODB. I just had to
2
7737
by: HelenWu | last post by:
I have two frames in index.html: <frameset cols="165,*"> <frame name="NCTnav" src="NCTnavHome.htm" scrolling="auto"> <frame name="NCTmain" src="http://www.yahoo.com"> </frameset> from frame "NCTnav", I have a link, when I click this link, I need to load http://www.google.com (for example) into frame "NCTmain". The code in NCTnavHome.htm like: <script language="JavaScript" type="text/JavaScript"> function...
1
5144
by: srivatsans101 | last post by:
Hi, I'm trying to access the IFrame contents on a HTML page as frames.document But in IE, I'm getting Access Denied Error Message. I tried to add the IFrame's Src WebSite (a local/intranet hosted dynamic HTML page) to Trusted Sites list in IE Options.
6
9328
by: Angel | last post by:
I am using coolmenus 4, frames version by DHTMLcentral.com. When I click on any of the submenus, I get an "Permission Denied" error. There after the menus stop working. The cursor on the menu changes to input text kind rather than the normal hand pointer that appears when you mouse over a link. If any of you guys have used Coolmenus please help out. Alteranately, if there are any versions of dropdown menus for frames please let me...
11
3655
by: SSG001 | last post by:
i have a form and in that i iframe in the main form <form name='form1> <iframe name="frame1" id="iframe1" src="iframe1.php" scrolling="yes" width="300%" frameborder="0" height="300"></iframe> <input type="button" name="save" onclick="save();"> </form> function save(){ window.frames.document.forms.add.click(); document.form1.submit();
3
5014
by: doby48 | last post by:
I have a JavaScrip that runs fine under all browsers except IE. I am opening up a document within an iframe and I get the error of Permission Denied in IE. I know that IE has security that will throw that error if the pages are on a different domain but in this case they are all on the same domain. The pages are in a subdirectory but I am referencing them accordingly and not calling a different domain. My code is as follows: <SCRIPT...
4
1595
by: Chico Che | last post by:
I have a ie window that launches a pop up window with no menus/toolbars nothing just the page. When I run an bookmarklet on main window it works fine but when I try running this on the popup I get an access denied error. All the javascript is doing is getting innertxt from a textbox. It works fine when main window is done but when popup is used it does not work. If anybody can help would greatly appreciate it.
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10436
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.