PDA

View Full Version : AJAX help


timme_v
03-09-2009, 01:12 AM
Hey guys, I posted this question in the PHP section and was directed over here, saying how you do this is through AJAX. So any help would be great.

Basically, what I want to do is create 1 html and external CSS file, and when you click buttons etc, it only changes the information within the div, it doesn't load a completely new HTML page.

For example, I have a div header called 'dHead' which has some buttons in it. When you click the button, I would like to just change the information in the body called 'dBody' without having to completely load a new HTML page.

If anyone could help me on how to achieve this, that would be great.

Thanks, Tim.

omnicity
03-09-2009, 08:15 AM
The information that you want to display: is it dynamic, or can you code it into the initial page?
If it is dynamic, then there are plenty of AJAX tutorials out there - you may even get by with a lightbox type of script.

If you can load the data into the initial page, then look into collapsing sections, tabbed layout etc.

Jon Hanlon
03-09-2009, 10:40 PM
Ajax won't really help you here.
You just need to load up heaps of CSS and then switch the layout dynamically.
Even if you used Ajax, there's nothing to trigger the browser to re-parse it as CSS.