Iframe

JavaScript – Iframe – the address where the iframe is located

cadres posés contre un mur blanc

For security reasons, you can’t directly reach the page outside the iframe from inside it. However, we can retrieve information from the browser. To retrieve the parent’s address, i.e. the URL of the page where the iframe is added, just write this: <script type=”text/javascript”> var url = (window.location != window.parent.location) ? document.referrer : document.location; alert(url); … Read more

Read the article →