views:

11

answers:

1

I am using the flex HTML component and I would like to clear the history of the control when it is taken off screen, so that when it comes back on again the history is reset.

The only thing I can think of at the moment is to set the HTML control to a new HTML control, although this is a bit of a pain.

Thanks

A: 

The HTML control has a property named historyLength and historyPosition properties. Both allude to fact that the HTML content has a window history.

I bet you can use the domWindow property to get, and empty the history object.

htmlObject.domWindow.window.history 

More info on the history object here. Nothing says it is read only, so I bet:

htmlObject.domWindow.window.history = new Array();

But I'm half guessing; I didn't try this code.

www.Flextras.com
Thanks will try soon
robmcm