开发者

Dynamic Frame Creation

I have a web page, normal n开发者_StackOverflow中文版o fuzz or weird stuff. And I want to trap that page inside an html frame when a user clicks on a given link.

The thing is i don't want to reload the page. Some kind of dynamic DOM trickery seems the way to go, but to no avail in my tests.

If anyone has any ideas it would be great!

Thanks


I don't think this can be done without a reload, at least not sanely.

It may be possible to move a complete DOM tree into a newly created, empty document within an IFRAME, but yuck! it sounds horribly expensive, will cause any Movies / animations and other things to reload, and you're still stuck with the outside document, where you need to remove all the elements so only the IFRAME or FRAME remains. Then you may encounter browser specific quirks when moving the DOM, and on and on....

I would really go with a reload.


The only other solution I can think of (not tested) is to already have the frame structure, with some of the frames with size 0. When the user clicks on the link you just resize the frames.

Does this make sense?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜