Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use existing html in html page

Status
Not open for further replies.

guttaboys

Programmer
Oct 28, 2003
17
NO
Hi,
is there a way to include existing html code in other html pages? My problem is that I have the same menu (collection of links) on a bunch of html pages, and if I would like to change something in the menu I have to cahnge it on all the pages that use it. If I had the menu's html code in its own file it wold be easy to make changes on all the other pages. Or is it an other way to solve the problem?
 
If your web hst allows server-side scripting (such as ASP, PHP, JSP, etc), or even server-side includes (SSIs), then you can use those. I'd get in touch with your web host and ask them if they provide any of these.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
That would mean that someone with Javascript disabled wouldn't be able to see those items. I've done it that way MANY times, and it's possible, but there's sometimes the problem of someone who turned Javascript off.

I agree with BRPS about using server-side includes. Those can be plain HTML files, or dynamically generated sections using server-side scripting, as he indicates.

Lee
 
but there's sometimes the problem of someone who turned Javascript off.
The most important "person" to do this is the Google search engine spider (and others). If all your site navigation is delivered in this way, it's unlikely that your site will be fully indexed by the search engines.

SSIs are the way to go if they're available to you.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top