dcsimg
How to stop child frame script from overwriting parent frame?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Yogesh_Kumar
Posted On:   Friday, October 26, 2007 07:18 PM

Hi,
I have a web page where I have a iframe with src pointing to external web sites. Some external websites have scripts which overwrites my parent page. Is there any way to either disable that kind of scripts in child frame or is there any way to protect parent page from that kind of overwriting?

Thanks

Re: How to stop child frame script from overwriting parent frame?

Posted By:   Firat_Tiryaki  
Posted On:   Friday, November 2, 2007 03:59 AM

You can check if parent frame has the same named function with the "typeof" function like below



alert(typeof(parent.yourFunctionName)) if it returns "function" then you have one.

About | Sitemap | Contact