Status
Not open for further replies.
Hello frnds,
I want to know that how can i include a File in my webpage.
Let me explain in detail :- I am developering a site which has side links and ads on both the sides.These side links are on all the pages with same look.So i want that when i change the data in my link bar it gets change in every file.I tried using
Code:
<!--#include file="sidebar.html"-->
But it didnot work .
The sidebar.html file had only the code of sidebars and no start or end tags of html.
So plz tell me in which extension should i save the sidebar file and how to include it.
Thanks in advance.
 

Sykora

I see right through you.
I think your best option would be to use a frameset. In that case you would have to fix up your sidebar.html to be a valid html page in its own right. Otherwise you could put copy paste your code in a separate class/id and position it with css.

And no, AFAIK there is no way to "include" an html file like C++.
 

ahref

In the zone
Although it can be done via frame, as suggested by sykora, but frame is not good option, you can do it by through php if your server support php or by server side include (shtml extension).
 
Status
Not open for further replies.
Top