Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

<embed> not quite what I was hoping for...

Oct 6, 2012 11:00AM PDT

I want to display a .txt file dynamically (everytime .html is loaded, I want the (current) .txt to be loaded).
I am using <embed> (see below),
But browser jams everything into a tiny scrollBarBOX .
How can I enLarge the BOX.
Or get rid of the BOX altogether.
====
<span id="INSERTION_MARKER"><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Minimalist Html Code</title></head><body><br>
<span><embed src="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt">
<span>

<span></body></html>
====

Thanks...Vernon

Discussion is locked

- Collapse -
Answer
Re: include text file
Oct 6, 2012 8:21PM PDT
- Collapse -
Include an external file inside of HTML
Oct 7, 2012 4:41AM PDT

I am trying to Include an external file inside of HTML that will work as crossBrowser:

I have come up with three methods of coding it, but only Chrome works for all 3 methods.
Anyone know of different ways to do this ?
Thanks...Vernon


Including an external file inside of HTML:

In the 3 methods below ,

for GoogleChrome, all Methods(1,2,3) work ,
and all methods show search results.

For InternetExplorer, all Methods(1,2,3) show something ,
BUT ONLY 'Method 2' shows search results.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Minimalist Html Code</title>

</head><body>
<br><br>
Method 1
<br>
<embed src="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt">
<br>
<br><br>
Method 2
<iframe src="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt" width="800" height="800">
<a href="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt">Hmm, you are using a very old browser.
Click here to go directly to included content.</a>
</iframe>
<br>
<br><br>
Method 3
<object width="800" height="800" data="C:\Users\vm\Desktop\myPrograms\~PortableFreeware.com\AkelPad\~~~Scratch.txt"></object>

<br>

<br>
</body></html>

- Collapse -
Just a comment.
Oct 7, 2012 4:57AM PDT

When dealing with Microsoft stuff I steer clear of filenames that contain non-Alphanumerics. Also for web work I stick to all lower case.

I know that many folk will write this should work but then again I don't have to do as many bug hunts as other folk.

With that out of the way, you know that HTML browsers CACHE content. You'll have to deal with that. I won't write about such as setting the expiry is just a little setting or code. Your choice.
Bob

- Collapse -
How would " setting the expiry " work in this case ?
Oct 7, 2012 9:52AM PDT

HI Bob,
[ When dealing with Microsoft stuff I steer clear of filenames that contain non-Alphanumerics. Also for web work I stick to all lower case. ]
Yes, that sounds right.

[ With that out of the way, you know that HTML browsers CACHE content. You'll have to deal with that. I won't write about such as setting the expiry is just a little setting or code. Your choice. ]

I am not sure what you mean here, other than I often click on ReLoad Button.
<div>How would "

setting the expiry

" work in this case ?</div>Thanks....Vernon

- Collapse -
How would "setting the expiry" work here ?
Oct 7, 2012 9:56AM PDT

Hi Bob,
I do fairly often use the ReLoad Button.
<div>How would "setting the expiry" work here ?
Thanks...Vernon
</div>

- Collapse -
It's an old issue.
Oct 8, 2012 6:18AM PDT