Question : How  can i change displayed ajax page using urls

Hello all,
I'm sure this is coming up quite a bit so maybe someone's got the answer...
How does one change the text of the address bar to reflect a page change implemented with AJAX?

In other words, I've got a small site where all the pages are AJAXed into through the index page. However, using PHP/Javascript, I've managed to cobble a function that will change the page given the presence of a page variable in the url string:

//HOME PAGE URL
http://www.mysite.com

//INSIDE PAGE
http://www.mysite.com/?page=contact

That all works fine. However, how can I have javascript change that page variable in the address bar when someone clicks on a link that is ajaxing a page in?

NOTE: using window.location.hash is not an option as I need to pass a variable for PHP reasons. Any non-hash alternatives?

Answer : How  can i change displayed ajax page using urls

>>Any non-hash alternatives?
No. As soon as you change the current value of the address bar, the browser will reload the page. using the hash property is your only method. If you are trying to change the url to "maintain" state so that if the user reloads the page then you will load the last "ajax" content (as opposed to the original content), then my suggestion would be to save the state to a cookie. If you see a value on the cookie upon reload then make a ajax call to "import" the content referenced in the cookie.

NOTE: yahoo has a History manager, but it depends on the hash as well:
http://developer.yahoo.com/yui/history/
Random Solutions  
 
programming4us programming4us