开发者

HTML5 and <frame> tag

I'm working on the email blast creator app that allows user to build and send HTML emails. Users can enter some data, select a template from the list, click Preview and see the resulting page inside the current page without refresh. I'm using AJAX POST request to submit the data to the server and get the resulting HTML code - full page with <html>, <head> and <body> tags. Before HTML5, I would insert the resulting page into the <frame> tag. for Since the <frame> tag was deprecated in HTML5 how can I display this page inside another? I can't use <iframe src="/preview..."></i开发者_高级运维frame> because I'm using POST and there's no URL that I can use as iframe's src.


Keep the iframe blank (with no src) until you have a URI to use. Just like you did with your frame.

Create a page with skeletal content:

<html>
<body>
</body>
</html>

and use that as the iframe's initial page. Then you have a document on which you may perform your DOM manipulation.


Have you considered opening a new window?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜