Adding HTML code to a page from another source

They have: 19 posts

Joined: Feb 2000

How do I embed HTML code into my HTML document from another file - say for example if I have a side nav that never changes and do not want to keep adding the same HTML code to my other pages to display. Ideally a link to a simple sidenav.html that embeds it into the document would be great. I don't want to use frames or CGI/ASP to achieve this
Thanks, your comments would be welcomed

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

I have just recently ventured into that part of the woods. I found the best way to be using a perl script to edit a .txt file that is included in your html using SSI. Apparently what you are looking for is a more dynamic form, where your links don't have to reload and stuff. Well the only way I can think of doing something like that would be a Dynamic PERL script, or to use frames...ewww.(I hate frames).

Just some suggestions.
VulKen
Keepin' It Realistic

Pimpin like a pimp with an electrofied pimpin machine!

They have: 231 posts

Joined: Feb 2000

Your best bet is with SSI but your host must support it. If SSI is not an option then you might want to try using a JS import file. You can import JavaScript code and use the document.write() method to embed HTML.

:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.