1

I have a Flex HTML component that is displaying content from a remote URL and a button in the Flex application that reloads the content. However, it takes a few seconds for the IFrame's content to refresh. During this time, there is no obvious feedback to the user that any action is underway.

I would like to clear the contents of the IFrame, so there is immediate feedback after clicking refresh, and then load the remote URL again. Is there a way to do this?

I've tried setting the HTMLText property to "" and setting the IFrame location to "about:blank", and neither of these have the desired immediate effect. (on it's own, setting the location to about:blank immediately clears the IFrame, but if it is followed by resetting the location to the original URL, the immediate clearing doesn't occur. Is this something to do with the IFrame caching the original page?)

4

2 回答 2

0

您可以解决的另一种方法是准备一个具有相同大小和相同位置的空白 iframe 或加载屏幕,同时加载内容,隐藏内容 iframe,并显示空白 iframe 或加载屏幕。这可能更容易获得更灵活的结果。

于 2012-07-20T04:26:40.497 回答
0

一种方法是从显示列表中删除组件并在其位置添加一个新的实例化组件。

这将确保完全初始化状态。

于 2012-07-20T16:35:54.777 回答