Including text From Other Pages or Text Files

Including text From Other Pages or Text Files

am 27.07.2007 18:43:42 von Elliot J

Hi all,

What I want to do is probably pretty basic, but as I've had no cause to look
into it previously, I'm currently a bit clueless.

Imagine I have a HTML front page (frontpage.htm), and a text file (test.txt)
on the same server.

I'm trying to find a way to link the text from test.txt into a table on my
front page, dynamically. So if I change the contents of test.txt then
refresh frontpage.htm, I can see the new text in the table.

To go one further, I would like to link certain blocks of text (ie: specific
contents of cells within a table) from a .htm file into my frontpage.htm
file in the same fashion.

I have been trawling the net for answers, but all I keep hitting on is
anchors and how to link to other pages.

If anyone can direct me to the commands to research or some
references/examples for what I'm trying to achieve, I would be extremely
grateful.

Thanks in advance.

EJ

Re: Including text From Other Pages or Text Files

am 27.07.2007 19:53:40 von John Hosking

Elliot J wrote:

> What I want to do is probably pretty basic, but as I've had no cause to look
> into it previously, I'm currently a bit clueless.

>
> I'm trying to find a way to link the text from test.txt into a table on my
> front page, dynamically. So if I change the contents of test.txt then
> refresh frontpage.htm, I can see the new text in the table.
>
> To go one further, I would like to link certain blocks of text (ie: specific
> contents of cells within a table) from a .htm file into my frontpage.htm
> file in the same fashion.

I don't know how you can do this (further one). Any near-solutions I can
think of are more work than they're worth.

>
> I have been trawling the net for answers, but all I keep hitting on is
> anchors and how to link to other pages.

Fairly amazing. I pasted your post's title into my search engine and got
several likely candidates. But for quick-and-easy, I dug up the FAQ,
because this question and that answer come up here regularly.

>
> If anyone can direct me to the commands to research or some
> references/examples for what I'm trying to achieve, I would be extremely
> grateful.

Does this help you?
http://www.htmlhelp.com/faq/html/design.html#include-file

--
John

Re: Including text From Other Pages or Text Files

am 27.07.2007 19:55:11 von Sherm Pendley

"Elliot J" writes:

> To go one further, I would like to link certain blocks of text (ie: specific
> contents of cells within a table) from a .htm file into my frontpage.htm
> file in the same fashion.
>
> I have been trawling the net for answers, but all I keep hitting on is
> anchors and how to link to other pages.
>
> If anyone can direct me to the commands to research

The term for what you want is "server side includes", or "SSI". Here's a
tutorial - if you're not using Apache, you can skip the server config
section of it, but the part that describes how to write your HTML should
still be relevant, unless you're on a *very* strange server.



sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Re: Including text From Other Pages or Text Files

am 27.07.2007 23:04:12 von Amos E Wolfe

"Elliot J" wrote in message
news:f8d7c1$2mc$1$8302bc10@news.demon.co.uk...
> Hi all,
>
> What I want to do is probably pretty basic, but as I've had no cause to
> look into it previously, I'm currently a bit clueless.
>
> Imagine I have a HTML front page (frontpage.htm), and a text file
> (test.txt) on the same server.
>
> I'm trying to find a way to link the text from test.txt into a table on my
> front page, dynamically. So if I change the contents of test.txt then
> refresh frontpage.htm, I can see the new text in the table.
>

assuming your server has php installed:

rename frontpage.htm to frontpage.php and include the line



--
-=# Amos E Wolfe #=-
AIM: Traindriver9334
Get Firefox: http://www.spreadfirefox.com/?q=user/register&r=122394

Re: Including text From Other Pages or Text Files

am 06.08.2007 09:45:57 von Elliot J

"Sherm Pendley" wrote in message
news:m2zm1hhgu8.fsf@dot-app.org...
> "Elliot J" writes:
>
>> To go one further, I would like to link certain blocks of text (ie:
>> specific
>> contents of cells within a table) from a .htm file into my frontpage.htm
>> file in the same fashion.
>>
>> I have been trawling the net for answers, but all I keep hitting on is
>> anchors and how to link to other pages.
>>
>> If anyone can direct me to the commands to research
>
> The term for what you want is "server side includes", or "SSI". Here's a
> tutorial - if you're not using Apache, you can skip the server config
> section of it, but the part that describes how to write your HTML should
> still be relevant, unless you're on a *very* strange server.
>
>
>
> sherm--
>
> --
> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> Cocoa programming in Perl: http://camelbones.sourceforge.net

Hi all and thanks for the feedback.

I tried Amos' suggestion, which did what I wanted to a degree, but I ended
up using .csv files for my data and pulling it into web pages with
OBJECTS/Datasrc's.

My gratitude to all who responded.