Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Txt function like <IMG SRC> ?

Reply
Thread Tools

Txt function like <IMG SRC> ?

 
 
Hugh Newbury
Guest
Posts: n/a
 
      11-11-2012
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
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-11-2012
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/
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      11-11-2012
In article <(E-Mail Removed)>,
Hugh Newbury <(E-Mail Removed)> 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
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      11-11-2012
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.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-12-2012
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/
 
Reply With Quote
 
Ray_Net
Guest
Posts: n/a
 
      11-12-2012
In article <g50idb29wg8v.1gbdm5dyuilp9$(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) 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>
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      11-12-2012
On Mon, 12 Nov 2012 17:21:35 +0100, Ray_Net wrote:

> In article <g50idb29wg8v.1gbdm5dyuilp9$(E-Mail Removed)>, (E-Mail Removed) 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>


that's what the object tag is and does.
include is server side and used in php.
object needs no server.

 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      11-12-2012
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


http://joliclic.free.fr/html/object-...ject-text.html
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-12-2012
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/
 
Reply With Quote
 
Tim Streater
Guest
Posts: n/a
 
      11-12-2012
In article <(E-Mail Removed)>,
richard <(E-Mail Removed)> 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?


> http://joliclic.free.fr/html/object-...ject-text.html


Badly out-of-date page, judging by the browser versions it claims to
work with.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
counting how often the same word appears in a txt file...But my codeonly prints the last line entry in the txt file dgcosgrave@gmail.com Python 8 12-19-2012 06:29 PM
Diff. between FileWriter("f.txt") and OutputStreamWriter(new FileOutputStream("f.txt")) ? Jochen Brenzlinger Java 7 09-15-2011 01:23 AM
Why doesn't Python's "robotparser" like Wikipedia's "robots.txt"file? John Nagle Python 5 10-04-2007 04:14 PM
object-like macro used like function-like macro Patrick Kowalzick C++ 5 03-14-2006 03:30 PM
Opening a txt file to view ( i.e. readme.txt) Sameen C++ 2 08-29-2005 03:14 PM



Advertisments