Tabs and Buttons Updating without Page Reload

wiredniko

Jedi in training
Jul 20, 2010
712
26
0
New York
This is the first time I am stumped when it comes to coding stuff.

How do I create a page where a user clicks on a button, tab, link whatever and only that thing updates...

For example, go to newegg.com and click on any product. There are three tabs overview, details and feedback how does that update without reloading the entire page?

Amazon is another example, you click on "is this review helpful to you? Yes or No" and only that updates.

Is it javascript based? Ajax requests?

I even looked at the code and I still do not clearly understand the basic concept. Can it be replicated with PHP?
 


As mentioned by others its a client side programming language doing this. Probably javascript. JQuery is a javascript library that can help javascript dev.

Here is a good TUT on tabbed content with Jquery:

Create a Slick Tabbed Content Area using CSS & jQuery | Nettuts+

The last example you mention (amazon review) is a bit more complicated. That sounds like AJAX. Simplified AJAX is a technique that uses javascript to interact with with a server side script (in your case php).

This is another nettuts tutorial on using AJAX with jQuery.

How to Load In and Animate Content with jQuery | Nettuts+

It shows you how to get data rather then send it, but it will help you understand the principle.
Should mention my js knowledge is pretty much 0, something i am trying to change, which is why i have these tutorials to hand!