How to load only one part of a website?

Ask about a PHP problem here.
Post Reply
nyo
Posts: 124
Joined: Mon May 09, 2011 1:55 pm
Location: Mobile

How to load only one part of a website?

Post by nyo »

Hi,

I was wondering if it is possible to load only a certain part of a page while browsing a website. I guess the following website is doing what I am trying to say:

http://www.hannahmarie.co.uk/

When you click on the navigation links (locations, treatments, etc.) the header, sidebar and footer stand still and only the content area loads (or not?). This is nice for faster navigating and lower bandwidth usae etc.

How can I do that?
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: How to load only one part of a website?

Post by EcazS »

The page is loading it's just not very noticeable since it's so small in size.

But this is what they're doing,
<a href="index.php?show=location">Location</a>
So when you click that link the index file will show that specific content,
if(isset($_GET['show'])) {
     //mysql_query to grab content from specified page using WHERE
     //echo out content
}
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: How to load only one part of a website?

Post by jacek »

Then you click a link the page does reload still, so this is just a simple template system. I have a tutorial on this which may be of some use.
Image
Post Reply