Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes HTML Include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML Include" Watch "HTML Include" New topic
Author

HTML Include

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
I have some 20 Static HTMl pages. In all 20 Pages I have the same Menu list

for Ex:

Home
AboutUS
ContactUS

Some times I will add few sub menus, In that time it's very difficult to change the same in all the 20 pages. Is their any way to include another HTML page. So that I can put all the menu related code in that HTML file

iframe is the only option ? please help me out
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
See if your server lets you do serverside includes.

Eric
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
It's a small website only static HTML pages(Running on Client machines). No dynamic content
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Sounds like you need to use frames....

OR

You spend some time and write a little application that will take a file and inject the code in for you when you are ready to release it/or build it. Ant and Maven would be your friend.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML Include