Scripted iFrame loads contents over current page instead of within an iFrame
- by HidingInABunker
I'm trying to load a webpage into an iFrame while keeping a content bar on top, but for some pages that I try to load into the iFrame the contents is loaded as if I navigated to that page.
I use the following code to dynamically load an iframe:
$('#my_iFrame').attr("src","http://www.nytimes.com/2010/03/26/opinion/26ryan.html");
It looks like there is a script on these pages that checks to see if it is being loaded into an iframe and changes the document.location to it's own url if so.
Is there any way around a hack like this so that I can load that site into an iFrame? Maybe some way to protect the value of window.location?