Using <object> To Include Boilerplate Text

Discussion in 'HTML' started by John McGaw, Dec 30, 2003.

  1. John McGaw

    John McGaw Guest

    Right now I use an SSI to include boilerplact in my site's pages and it
    works fine. However, it seems as though it should be easier to do it using
    an <object> which, reading the descriptions, should be possible. Of course I
    can't get it to work which is why I'm posting this.

    Given that a file named "thefineprint.txt" exists in the site's base
    directory on the server and which works for the SSI, I've tried inserting
    the text into my HTML using:

    <object data="http://johnmcgaw.com/thefineprint.txt" type="text">
    Warning: thefineprint.txt could not be embedded.
    </object>

    and I've tried using:

    <object data="thefineprint.txt" type="text">
    Warning: thefineprint.txt could not be embedded.
    </object>

    But both methods fail totally and display the warning text only.

    Can someone tell me what I'm missing? Or tell me if I'm simply trying to do
    the impossible?
    --
    John McGaw
    [Knoxville, TN, USA]

    Return address will not work. Please
    reply in group or through my website:
    http://johnmcgaw.com
    John McGaw, Dec 30, 2003
    #1
    1. Advertising

  2. John McGaw

    Spartanicus Guest

    John McGaw wrote:

    >Right now I use an SSI to include boilerplact in my site's pages and it
    >works fine. However, it seems as though it should be easier to do it using
    >an <object> which, reading the descriptions, should be possible. Of course I
    >can't get it to work which is why I'm posting this.


    If you are attempting to do a "Client Side Include", there is no such
    thing (for good reason). Embedding external data into a document using
    the <object> tag opens a viewport similar to <iframe>.

    --
    Spartanicus
    Spartanicus, Dec 30, 2003
    #2
    1. Advertising

  3. John McGaw wrote:

    > <object data="http://johnmcgaw.com/thefineprint.txt" type="text">
    > Warning: thefineprint.txt could not be embedded.
    > </object>


    Your type attribute should be "text/plain".

    > But both methods fail totally and display the warning text only.


    It could be caused by the incorrect type, but in general I think you'll
    find SSI a more reliable solution. Many older browsers have problems with
    the <object/> element, including even the most recent releases of MSIE.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Dec 31, 2003
    #3
    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. dwok
    Replies:
    2
    Views:
    457
    Lucas Tam
    May 11, 2005
  2. news.rcn.com
    Replies:
    9
    Views:
    749
    Roedy Green
    Jan 23, 2006
  3. Replies:
    0
    Views:
    358
  4. John Hunter

    interface boilerplate

    John Hunter, Oct 17, 2004, in forum: Python
    Replies:
    3
    Views:
    318
    Alex Martelli
    Oct 18, 2004
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    879
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page