Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Txt function like <IMG SRC> ?

29 views
Skip to first unread message

Hugh Newbury

unread,
Nov 11, 2012, 12:17:36 PM11/11/12
to
Is there a function in HTML that will get a page to load a chunk of text
in exactly the same way that <IMG SRC> loads pix?

Hugh

--

Hugh Newbury

www.evershot-weather.org

Jukka K. Korpela

unread,
Nov 11, 2012, 12:21:21 PM11/11/12
to
2012-11-11 19:17, Hugh Newbury wrote:

> Is there a function in HTML that will get a page to load a chunk of text
> in exactly the same way that <IMG SRC> loads pix?

No. Things like that are handled using server-side includes (or
preprocessing).

--
Yucca, http://www.cs.tut.fi/~jkorpela/

dorayme

unread,
Nov 11, 2012, 4:01:30 PM11/11/12
to
In article <aga4th...@mid.individual.net>,
Hugh Newbury <hu...@hnewbury.uklinux.net> wrote:

> Is there a function in HTML that will get a page to load a chunk of text
> in exactly the same way that <IMG SRC> loads pix?

Not really, you would normally use server side includes for this.

Perhaps the closest you can get to using HTML to do this is an inline
class attribute with CSS that uses the 'content' property and the
:before and :after pseudo-elements; not much use generally, but maybe
useful for special purposes.

And, of course, for sighted visitors, you can make a pic of text (make
it big enough so none of those visitors have trouble)!

--
dorayme
Message has been deleted

Jukka K. Korpela

unread,
Nov 12, 2012, 12:50:05 AM11/12/12
to
2012-11-12 1:48, richard wrote:

> On Sun, 11 Nov 2012 17:17:36 +0000, Hugh Newbury wrote:
>
>> Is there a function in HTML that will get a page to load a chunk of text
>> in exactly the same way that <IMG SRC> loads pix?
>>
>> Hugh
>
> <object>

It does not load text in the same way that <IMG SRC> loads an image
nowhere near. You could see this if you actually tried it.

> create a page with the text on it.
> At the point where you want the text to show, insert the tag.
> enclose the tag in a division container and style the division.

If you had actually tried it, you would know that styling the division
has no impact on the style of the text.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Ray_Net

unread,
Nov 12, 2012, 11:21:35 AM11/12/12
to
In article <g50idb29wg8v.1gbdm5dyuilp9$.d...@40tude.net>, nor...@example.com says...
>
> On Sun, 11 Nov 2012 17:17:36 +0000, Hugh Newbury wrote:
>
> > Is there a function in HTML that will get a page to load a chunk of text
> > in exactly the same way that <IMG SRC> loads pix?
> >
> > Hugh
>
> <object>
>
> create a page with the text on it.
> At the point where you want the text to show, insert the tag.
> enclose the tag in a division container and style the division.

I think that he just want a kind of
<include>\\alltextfiles\mytextfile.txt</include>
Message has been deleted
Message has been deleted

Jukka K. Korpela

unread,
Nov 12, 2012, 1:01:22 PM11/12/12
to
2012-11-12 19:50, richard wrote:

> that's what the object tag is and does.

So you still haven't actually tried it, have you?

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Message has been deleted

Jukka K. Korpela

unread,
Nov 12, 2012, 1:24:53 PM11/12/12
to
2012-11-12 20:02, Tim Streater wrote:

> In article <14hbwwxkxmqr0.v...@40tude.net>,
> richard <nor...@example.com> wrote:
[...]
>> http://joliclic.free.fr/html/object-tag/en/object-text.html
>
> Badly out-of-date page, judging by the browser versions it claims to
> work with.

Last-Modified: Wed, 25 Oct 2006.

But that's really not the point. The point is that inclusion of content
with <object> (or with <iframe>) will not "get a page to load a chunk of
text in exactly the same way that <IMG SRC> loads pix". It simply
includes an external document, rendered in an isolated box.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Message has been deleted

Ray_Net

unread,
Nov 12, 2012, 7:17:33 PM11/12/12
to
In article <e4pv2o15vt6k$.191ahrfkb2i3e$.d...@40tude.net>, nor...@example.com says...
> that's what the object tag is and does.
> include is server side and used in php.
> object needs no server.

The question was not to use it in php but:
"Is there a function in HTML..."
0 new messages