Loading navigation on all web pages from 1 source

Hey,

So as stated in the title I would like to load a part such as the HTML behind the navigation bar on all my pages, so when I change something in the navigation menu it is applied to all pages. I  use notepad for doing the scripting.

Id like to be able to do this for things like the footer etc also

How do I do this?

Thanks!
LetsgetcodingAsked:
Who is Participating?
 
GkCommented:
<?php include("header.php"); ?>
0
 
GkCommented:
I dind et it clearly.

Is it something like include php code in all the pages? use ' include'.
If you want it at browser side, use java scripting to update a names Div tag in all pages.
0
 
LetsgetcodingAuthor Commented:
Is it easy writing HTML into a PHP file to call it?

Another thing I want to clear up, does a page have to be PHP to call PHP functions from another file?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Jagadishwor DulalBraces MediaCommented:
Yes you can not call php code in a html page you must change file extension to php and you can call functions to another page but before calling function you must include function page in the current page.
0
 
LetsgetcodingAuthor Commented:
Ok thanks.

How do I do it browser side using JS?
0
 
havj123Commented:
<!--#include virtual="/footer.html" -->
0
 
GkCommented:
all the page should access a variable from your navigation page. same way if you update it, refresh the loaded page also.

you can access the other page by parent.framename.varABC ...
0
 
LetsgetcodingAuthor Commented:
Fixed this issue by having a php site and using Include()

Thanks all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.