views:

239

answers:

1

Hi this is my first post here, so please be kind ;-)

i'm implementing a browser history manager, just like rsh or yui browser history manager.

The idea was not to constantly poll the url hash of a hidden iframe, but to capture the onscroll event of an iframe, when it scrolls to an anchor name on an urlhashchange.

So on every click i add an new anchor to iframe and set the iframe's hash to the anchors name. When pressing the back or forward button the frame scrolls to the previous or next anchor and the onscroll event is fired.

That works great on firefox 3.0+, IE6 and Opera but on IE7 when hiting the back button the frame unloads and loses all its anchors.

If anyone has an idea why this is happening or even a fix for this "bug", please i'm slowly going insane over this.

thanks in advance

btw the onscroll idea comes from: http://www.zachleat.com/web/2008/08/21/onhashchange-without-setinterval/

+1  A: 

You might get some mileage from the DOJO toolkit which seems to have some workarounds for IE7 http://o.dojotoolkit.org/forum/dojo-core-dojo-0-9/dojo-core-development-discussion/dojo-hash-cross-browser-html5-onhashchange

mplungjan