954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Include content from one page to another with HTML Code

By steve petersen on Jun 28th, 2009 3:34 am

<!--#include virtual="YOUR URL" -->

How does this work? I copy the all codes above to my existing page, it does not display anything.

xxxservicexxx
Newbie Poster
20 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

first check if you are using the right DTD,
if you are including file from different domain than it wont work.

drsim
Newbie Poster
6 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

Thanks drsim, I think I need to study more in Html, and how to use properly the Document type.. as of now, im a very new learner in html, noob one. Hope soon I'll have more knowledge in Webdesigning, I love too...just hate that I'm just a starter^^.

xxxservicexxx
Newbie Poster
20 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

you are welcome, sure you will be master one day.good luck

drsim
Newbie Poster
6 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

the code supplied is WRONG
includes do not work in html
includes require shtml
the filename has to be altered to shtml and the server has to be configured to parse .shtml for server includes
base level hosting likely will not include .shtml .php or .asp
php & asp EAT .shtml for ability, popularity, available resources

useless codescrap

if wishing to ustilise server scripting of any sort, determine what the host package supports and use the highest

if a *n?x host likely supports .shtml and .php,, use php
if a windows host likely supports .shtml and .asp,, use asp (and get treatment whatever condition made you choose windows hosting :D )

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

Thanks almostbob, I may not know much in this code but seeing your posts, I can see you know what your saying, from a hunch, I felt you have correct points and more experienced. When I know how this things work, I might come back here and post the correct codes and the required features in the server to work it completely.,coz this will be very useful in web designing/developing.
Or maybe some can post the correct codes or steps to make it work (pls show the complete codes)

xxxservicexxx
Newbie Poster
20 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

once you have determined what server scripting language your host package supports, google a basic tutorial
w3schools.com has many, not perfect but,,,,
the correct code is already published, thats what the html/css php asp forums on this site do.
the include scrap works,, for shtml not html
<?php include('filename'); ?> for php

experiment
attempt
ask
and whichever language you find to use, there will be someone to answer

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

Thanks a lot almostbob. Yeah I gona try and experiment this things.

xxxservicexxx
Newbie Poster
20 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

Almost Thanks a lot to share your very useful post.

Mike_Slough
Newbie Poster
16 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

Thanks to share nice code for our site.

Mike_Slough
Newbie Poster
16 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

Oh man! Who the hell resurrected this old piece of rubbish? The code is bogus for HTML. Let sleeping farty old clapped-out dogs lie. Get a grip!

"The OP has left the building".

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,800 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You