Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Loading navigation on all web pages from 1 source

Posted on 2011-04-26
10
Medium Priority
?
187 Views
Last Modified: 2012-05-11
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!
0
Comment
Question by:Letsgetcoding
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 2

Expert Comment

by:Gk
ID: 35473148
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
 
LVL 2

Accepted Solution

by:
Gk earned 2000 total points
ID: 35473150
<?php include("header.php"); ?>
0
 

Author Comment

by:Letsgetcoding
ID: 35473234
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 35473656
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
 

Author Comment

by:Letsgetcoding
ID: 35473918
Ok thanks.

How do I do it browser side using JS?
0
 
LVL 6

Expert Comment

by:havj123
ID: 35473954
<!--#include virtual="/footer.html" -->
0
 
LVL 2

Expert Comment

by:Gk
ID: 35473956
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
 

Author Closing Comment

by:Letsgetcoding
ID: 35483062
Fixed this issue by having a php site and using Include()

Thanks all.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question