View Full Version : A little help

02-22-2011, 10:25 PM
I have a project right now which is creating a website which acts like an application. Doing this I have used ajax calls to load differnet pages into a div. However I have run into a problem, which I hope is easy to fix.

Basically as all the pages are loaded through ajax the URL stays as index.php all the time. However I have a modal popup which allows you to login. I was wondering if there was anyway to get the current page that is open in the div so that once the user logs in it ajax calls the last page and displays it again.

Any help? For reference see www.wiiclan.net
For a example of the modal popup search the database for "wii", the click on any game. Once loaded click the yellow "alert" button on the right hand side.

02-23-2011, 07:32 PM
You can set a unique "window.location.hash" for each page so that you can track what scripts should be run to bring the user back to any state.

Here is a little article: