Possible Duplicate:
How AJAX is done in github source browse?
At the moment I have a div and the following code on a link:
<a href="#" onclick="$('div#content').load('Admin/users.php');" id="admin-panel-icon"></a>
Basically, that just loads the file users.php in to the div content that is on the index.php page. In the URL bar, a # just gets added after index.php taken from the href="#".
So I have made it now so that the link looks like the following:
<a href="#AdminUsers" onclick="$('div#content').load('Admin/users.php');" id="admin-panel-icon">
But now there is the problem of bookmarking and page refreshing. How would I go about making it so that when a user visits index.php#AdminUsers it loads the users.php file contents in to the div #Contents?
I imagine there is maybe a better solution to what I'm doing. I mean ideally I would like people to be able to visit /Admin/users.php and not have any hash tags but I'm not sure how I'd go about doing this whilst at the same time only loading the users.php content?