Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

internet explorer 7 iframe unloads when going back

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.

Does anyone have an idea why this is happening or have a fix for this "bug"?

BTW the onscroll idea comes from this page.

like image 965
André Avatar asked Jan 26 '10 19:01

André


1 Answers

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

like image 70
mplungjan Avatar answered Nov 14 '22 23:11

mplungjan