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:
Code:
//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?