PDA

View Full Version : How to make top bar not reload again



chato
07 Jan 2007, 08:27 PM
Hello,
Thanks to all users of this forum is it helpfull. I have a sample here "http://www.divingco.com.au/index.html" when I click on the menu I have noticed at the top of the page a bar image area it does not reflash when I click on Company Profile for example it changes only the text content but the topbar and menu section do not reload again, do you know how to do this? Thanks.
Regards

Wickham
08 Jan 2007, 02:27 AM
Wherever you have content that is the same on lots of pages you have two choices:-

Either do it the old way which has the page set up as frames where the frames for the header and menu links and footer are linked to just one separate page for each header, menu or footer to avoid editing every page when something needs changing. The main page also has a frame for the content and this changes to show a different content page according to which menu button is clicked. This method is not recommended now but still works fine and you could use it if your host/isp does not support the next method.

Use a "server side include" method such as PHP or shtml. In this method there are several different main pages with different content. At the positions where you would have repetitive code on each page you insert SSI code instead of all the header, menu or footer codes. Separate files include only the header, menu of footer code (no doctype, head section, html or body tags). The host server substitutes the SSI code with the html code in the separate content files before downloading by the viewer.

In the divingco.com source file there are no frames so they did not use method 1. There is no sign of SSI code but that is what they probably used - it can't be seen by the viewer as it was all changed by the server before downloading.

Or they just repeated the code on every page which seems unlikely.

To use SSI you need to check whether your contract with your host or ISP supports it. Cheap contracts for free webspace never do.