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?
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?
Comment