| Author |
HTML include Page
|
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
Hi,
I have some static HTML pages, how to include another static HTML page in my page. please assist
I tried
<!--#include FILE="b.html" -->
But its not working.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
There is nothing in HTML to allow including other resources. You'll need to use whatever server-side include mechanism your web server provides.
What are you using for a web server?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
|
No web servers.. Simple HTML pages (Static Pages)
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
Without a server, how is anyone able to view your pages?
If they are just opening them as local files in the browser, then there is no include mechanism available. (Although I guess you could fashion one out of some Ajax code, but that would be rather weird.)
|
 |
marten kay
Ranch Hand
Joined: Feb 03, 2007
Posts: 165
|
|
You could use an iframe, for example
sample1.html could have this code
and in the same directory as the above, sample2.html could have this code
with this code, material from sample2.html is included in sample1.html
|
when in doubt put it in parenthesis and stick a dollar sign in front of it, only good can come from this.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
An iframe isn't exactly the same thing. It's a fixed size and does not include the enclosed page in the parent page.
Or, is that what the OP meant by "include"?
|
 |
marten kay
Ranch Hand
Joined: Feb 03, 2007
Posts: 165
|
|
|
definitely, an iframe allows you to get stuff from one page into another and include material in the general sense - not in the specific sense of a server side include. As we don't really know the design requirement that is being addressed here, the iframe may be an option.
|
 |
 |
|
|
subject: HTML include Page
|
|
|