Forum Moderators: open

Message Too Old, No Replies

Problem with back button and AJAX

         

Marfola

3:24 pm on Nov 27, 2007 (gmt 0)

10+ Year Member



I have an Ajax application and I want to take control of the back button. I have implemented a Javascript, but it runs correctly only on Firefox. In IE7 I got some problems.

My script runs as follow:
- when I click from a tab to another of the same page I update the sub-content via Ajax and I change my url adding hash parameters (using window.location.hash).
- when I get an url with hash parameters I parse it and I send the correct sub-content to the page.

Everything manage correctly in Firefox. If I click on the browser back button I can always get the right url (with hash parameters), then I parse it and send the correct sub-content to the page.

In I.E. 7.0 if I click from a tab to another of the same page, the history browser doesn't push nothing. It contains always the first entry of my page (without hash parameters), while the browser bookmark got the correct url.

Could someone help me to find the problem?

mehh

3:42 pm on Nov 27, 2007 (gmt 0)

10+ Year Member



This is a well known problem with IE. The only solution for it that i can think of off the top of my head is changing the href of a hidden iframe. try googleing for other solutions