How to show a webpage nested in a div?
I have some simple HTML
<div id="overlay"> <div> <p>Content you want the user to see goes here.</p> Click here to [<a href='#' onclick='overlay()'>close</a>] <div> <object type="text/html" data="http://google.com"></object> </div> </div> </div> I get an error like,
This content cannot be displayed in the frame.
How to show webpage inside div?
www.google.com , and on other sites use the X-Frame-Options HTTP header , which indicates that attachment is allowed only from the same source:
x-frame-options:SAMEORIGIN Browsers respect this title and prevent the embedding of the site.
The reason for this is that Google sends the response header "X-Frame-Options: SAMEORIGIN" . This setting prevents the browser from displaying iFrames that are not hosted in the same domain as the parent page.
X-Frame-Options Response Header
Here is the work:
<iframe id="if1" width="100%" height="254" style="visibility:visible" src="http://www.google.com/custom?q=&btnG=Search"></iframe> Here is another workaround:
How to load HTML site code using jquery?
Good luck