This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
Consider Paul's rocket mass heater.
 
subject: HTML Include
 
Similar Threads
CSS external file
Struts Menu Question
Combining static and dynamic content
Pls Help ( javadoc comment for DataAccessFactory)
generating dynamix menus, headers, and content using static html and jsp