Some sites like facebook, orkut, gmail etc have got everything on one page. Or one frame and the pages are included with some ajax tricks. The point is the main window never seems to reload. How could I accomplish this? If I could do that, I would be able to implement a chat system to my site since that kind of chat systems only work when the page is not refreshed entirely. Right now my script works like this: setup.php functions1.php functions2.php normal pages a normal page includeds functions2.php which includes functions1.php which includes setup.php Would it be hard to make my script work in a similar manner? Google sites are in js but facebook seems to be in php. Here is random facebook URL http://www.facebook.com/profile.php?ref=profile&id=1348726257#!/?sk=events sk=events - that changes the pages. Do they have everything on one page or is there a system that includes different pages? Ajax?
It's all done via AJAX. Basically have one div (main) and populate it based on the request. There is a PHP framework (NOLOH) for this but you could write your own. http://www.noloh.com Try clicking on the nav links and it's just like facebook and google's.
Great. Looks that it can be done without making any major modifications to my script, or maybe not...
Just checked out Mod_rewrite - new to me! That's very useful as well for playing around with the URL. My current script isn't built to work like that. I do have the header and the footer in a separate file, but it's vice versa - the body fail includes the header and footer (they are functions which are called in the body file). My aim is to get my script to work without reloading the header and footer, so that the body changes only. I tried including the header/footer file in the body file. At first it seemed to work, but then I realized that all the get and post variables would be messed up since they are posted to the body file directly, not the header/footer file - a lot of recoding would have to happen. Would there be a more simple way to do this? I am willing to pay someone to help me modify my script.
Hey Brandon, thanks for the mention. As Brandon was saying NOLOH http://www.noloh.com does this automatically for you. We even have a Nodule (NOLOH Module) that allows you to literally drop in place the Module and then just have it populate your Panels while allowing it have a bookmarkable URL. You can see an example here: http://www.noloh.com/NOLOH/Nodules/NavHandler/Example/, click on red, green, blue and refresh whenever you like. Unfortunately, you'll have to use NOLOH, but the many benefits that NOLOH provides allows NOLOH to easily earn it's keep. The Nodule I mentioned can be downloaded and it's source and above example source here: http://github.com/noloh/NavHandler/blob/master/Example/index.php, you can also watch a recent NOLOH screencast from the Confoo 2010 web conference here http://vimeo.com/10106797
Hi check out XAJAX framework for PHP if your interested in learning some AJax it's an easy entry point. http://xajaxproject.org/