• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

include html in another html

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have an application which consist of only static pages.
there are almost 45 html files each having the footer code (which is same for every page)

so what i want to do is to have that footer code in one file and include that in each of the html.

i searched on net and found out SSI and javascript.
SSI looks scary to me as i can't test that in local host and all and this is a customer facing web site.

with javascript - there are two links also in the footer - they stops working if i take that code in javascript.

i'm using document.write("<html code>")
please help - i've to deliver code tomorrow
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can write a frame or iframe tag with src = your footer. Most people discourage frames for the main body of pages for a number of reasons, but you might find they work here. It's an extra trip from the browser to the server to get the embedded page which may be a factor for you.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ishita,

SSI was the hallmark of StoryServer - at a certain period a very successful Vignette content management web platform for the enterprise.

You can trust it ;-)

Regards,
Dan
 
Ishita Saha
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah i looked on the option of using frames and iframes but both are browesr depenedent - it seems.

and my website is customer facing so not sure what kind of browsers they may use.

Could you please provide me some more idea about server side includes?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SSI is a feature of the web server, not of HTML. What server are you using?
 
rubbery bacon. crispy tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic