sivle
asked on
Break Out of IFRAME when URL changes
I'm framing in a portion of anotherwebsite.com on mywebsite.com/page (urls are just for example), which looks just fine and gives me the desired result I'm looking for. However, when someone clicks on a link inside the IFRAME the content inside the IFRAME will change to something like anotherwebsite.com/contact us, but I will not want these other pages to be embedded inside the IFRAME. I would like to have the user broken out of the IFRAME somehow into a pop up window with the full URL or just have the browser load the new URL. Is there anyway to detect this URL change and break the user out of the IFRAME? The website embedded in the IFRAME is not mine, so I don't have control over the content or code behind the site. Thanks.
ASKER
Thanks, but that tells you how to prevent your site from being included inside an IFRAME. In other words, it is used to automatically break your own site out of an IFRAME that someone else is trying to include your site in. I'm embedding someone else's page inside of my IFRAME and want to break them out when the URL changes. Different scenario.
Sorry mis-read the question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think i've seen similar things done with Javascript...perhaps I need to move this question to that area for help. Thanks for the feedback.
sivle, it seems to me your request was very clear, and my response is correct. Even though you posted this under Scripting languages, you will still get the same answer if you post this under Javascript, after all, javascript IS also a scripting language. The "solution" you seek is NOT dependent on any scripting language. The "solution" depends on whether or NOT you have control over the page within the iframe. Javascript or not, the limitation to what you seek is the security restriction imposed by the browser, not the scripting language you use.
https://www.experts-exchange.com/help.jsp#hi405
https://www.experts-exchange.com/help.jsp#hi405
http://usablelayout.com/articles/automatically-break-out-iframe
Regards