Forum Moderators: coopster

Message Too Old, No Replies

How to put navigation and content in separate divs

How to put navigation and content in separate divs

         

capacitated

9:39 pm on Oct 30, 2009 (gmt 0)

10+ Year Member



I know html and css but am new to php. This is what I am trying to do: My index.php page has two divs, A and B. I want to put my navigation in div A and the content in div B. When I click a link in div A, I want a .hmtl page to poulate in div B. What is the simplest way to do this? Thanks.

TheMadScientist

9:44 pm on Oct 30, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi capacitated,

Welcome to WebmasterWorld!

JavaScript / AJAX is the way to go for what you are asking.

With a PHP solution you will have to reload the entire page to get the information into div B, with AJAX you can insert the information from an HTML file into div B without reloading div A or the entire page.