Txt function like <IMG SRC> ?

Discussion in 'HTML' started by Hugh Newbury, Nov 11, 2012.

  1. Hugh Newbury

    Hugh Newbury Guest

    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
     
    Hugh Newbury, Nov 11, 2012
    #1
    1. Advertising

  2. 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/
     
    Jukka K. Korpela, Nov 11, 2012
    #2
    1. Advertising

  3. Hugh Newbury

    dorayme Guest

    In article <>,
    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?


    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
     
    dorayme, Nov 11, 2012
    #3
  4. Hugh Newbury

    richard Guest

    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.
     
    richard, Nov 11, 2012
    #4
  5. 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/
     
    Jukka K. Korpela, Nov 12, 2012
    #5
  6. Hugh Newbury

    Ray_Net Guest

    In article <g50idb29wg8v.1gbdm5dyuilp9$>, 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>
     
    Ray_Net, Nov 12, 2012
    #6
  7. Hugh Newbury

    richard Guest

    On Mon, 12 Nov 2012 17:21:35 +0100, Ray_Net wrote:

    > In article <g50idb29wg8v.1gbdm5dyuilp9$>, 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.
     
    richard, Nov 12, 2012
    #7
  8. Hugh Newbury

    richard Guest

    richard, Nov 12, 2012
    #8
  9. 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/
     
    Jukka K. Korpela, Nov 12, 2012
    #9
  10. Hugh Newbury

    Tim Streater Guest

    In article <>,
    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?


    > 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.

    --
    Tim

    "That excessive bail ought not to be required, nor excessive fines imposed,
    nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
     
    Tim Streater, Nov 12, 2012
    #10
  11. 2012-11-12 20:02, Tim Streater wrote:

    > In article <>,
    > richard <> 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/
     
    Jukka K. Korpela, Nov 12, 2012
    #11
  12. Hugh Newbury

    richard Guest

    On Mon, 12 Nov 2012 18:02:57 +0000, Tim Streater wrote:

    > In article <>,
    > 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?

    >
    >> 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.


    So? Works just fine with firefox 9.
    Even though many tags, such as <b> have been deprecated, they still
    function.
     
    richard, Nov 12, 2012
    #12
  13. Hugh Newbury

    Ray_Net Guest

    In article <e4pv2o15vt6k$.191ahrfkb2i3e$>, says...
    >
    > On Mon, 12 Nov 2012 17:21:35 +0100, Ray_Net wrote:
    >
    > > In article <g50idb29wg8v.1gbdm5dyuilp9$>, 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.


    The question was not to use it in php but:
    "Is there a function in HTML..."
     
    Ray_Net, Nov 13, 2012
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Richter

    <txt src= ...> equivalent of <img src= ...>

    Steve Richter, Feb 8, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,113
    Laurent Bugnion
    Feb 9, 2006
  2. Greg Johnson
    Replies:
    4
    Views:
    3,098
  3. Replies:
    1
    Views:
    1,629
    Alex Hunsley
    Mar 23, 2007
  4. pheadxdll
    Replies:
    16
    Views:
    3,709
    Neredbojias
    Jun 6, 2007
  5. Replies:
    7
    Views:
    185
    Tad McClellan
    Jun 22, 2006
Loading...

Share This Page