![]() |
close iframe that's in another domain
Hello
I'm using lytebox to open an iframe, but the iframe url is in another domain that the parent window. i need to close the iframe when user clicks a button. I can do that with javascript : top.$lb.end(); the $lb.end(); starts lytebox scripts in parent window which close the iframe and modify all the css stuff. That works when my iframe url is in the same domain. But when it's in another domain, that does'nt work. Can anyone tells me how to do that ? Starting the $lb.end() function of the parent window ? Thank you. |
<iframe>'s which display content from different domains have security measures in place to prevent all sorts of evil consequences.
So for security reasons JavaScript cannot access anything beyond the domain of the current page. This is known as the "same origin policy" and prevents a document or script loaded from one origin from getting or setting properties of a document from a different origin. So I don't think that what you want is possible. All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit. |
| All times are GMT +1. The time now is 12:30 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.