style513 / reallysimplehistory

Automatically exported from code.google.com/p/reallysimplehistory
Other
0 stars 0 forks source link

Back button changing hash value but not changing content #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am using Ajax to change the content portion of my webpage. I finally got 
the hashes to change when you click the links - the page content changes 
like it is supposed to. 

My problem comes about when you click back, the hash value changes to the 
previous value, but the content does not. 

Do I need to add special code to handle the hash value? The examples are 
confusing me :\ I am using php so I was trying to parse the URL with php 
and then put code in the content.php file to handle the value.

I think the issue comes about because the page is not actually reloaded 
with the back button (which is how it's supposed to be) but the code is 
not actually recalled. 

The structure of my page is an index.php page which includes content.php 
in the content div. The ajax function basically calls the content.php 
function and passes it the page value.

How do I get the content to change with the back button and hash value?

Original issue reported on code.google.com by sunitath...@gmail.com on 30 Jan 2008 at 11:38

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Figured out you have to call the ajax function in the handleHistoryChange 
function 
and then pass this function to the listener like

dhtmlHistory.addListener(handleHistoryChange); 

Thanks!

Please close this issue.

Original comment by sunitath...@gmail.com on 30 Jan 2008 at 11:50