Using <object> To Include Boilerplate Text

J

John McGaw

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
 
S

Spartanicus

John said:
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>.
 
T

Toby A Inkster

John said:
<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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top