dcsimg
Access Denied error in frames
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   suresh_kumar
Posted On:   Thursday, February 15, 2007 07:23 AM

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: function displayURL(){ self.childframe1.location.href="http://www.google.com"; alert("child frame URL="+self.childframe1.location.href); // above line i am getting the 'Access Denied Error' } ]]>]]> child frame:(child1.php): Display   More>>

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:















child frame:(child1.php):






Display Google







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".

   <<Less

Re: Access Denied error in frames

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, February 17, 2007 12:07 PM

I think you're up against a basic security principle -- "cross-site scripting" is prohibited, in most or all browsers.



Otherwise someone could potentially set up a frameset with your web site in one frame, and extract some personal info from your users, in another frame.

Re: Access Denied error in frames

Posted By:   Anonymous  
Posted On:   Thursday, February 15, 2007 11:10 AM

function displayURL(){

self.childframe1.location.href="http://www.google.com";

// page process to loading. Try childframe1.onload or onredystatechange

alert("child frame URL="+self.childframe1.location.href);
About | Sitemap | Contact