Reputation: 429
I try to include HTML page by SRC
using iframe
:
<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="widget.html">
</iframe>
So, this way shows html file as simple text(code) in iframe
HTML file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1404.34">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000; min-height: 14.0px}
span.s1 {font-kerning: none}
</style>
</head>
<body>
<b>test page</b>
</body>
</html>
Upvotes: 0
Views: 678
Reputation: 20496
Just for future reference if anyone else is having this issue, after discussing further and looking at the HTML it was found that the iFrame src didn't have the <html>
tag surrounding it.
Upvotes: 1