Help importing text

User 2308412 Photo


Registered User
12 posts

I need a little help in deciding how to do something. I've been looking around, Googling, and can't find an answer so I thought I would ask here.

I'm working on a personal web site for my weather station. The station is at a remote location and it sends data and creates an index.html which is then uploaded to my host for a web site.

I would like to include a text file from the NOAA. The file is on my web site in a folder called /metar.

My question is; is there a script or statement I can code into the index.html that will take the txt file and display the entire contents within a cell of a table? If you need to see the file I'm importing it is:

http://www.limaweather.com/KAOH.TXT

The only thing I would hope to have it do is word-wrap within the cell so it doesn't stretch out the cell horizontally. (Vertically is OK).

Any thoughts?
User 2073552 Photo


Registered User
1,625 posts

Just simply take the text from that document and add it to the existing index.html .
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 187934 Photo


Senior Advisor
20,271 posts

I'm thinking he was thinking dynamically.:P
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 122279 Photo


Senior Advisor
14,648 posts
Online Now

If it is the same file, with the same file name, that gets overwritten every time new data is sent, you could show it in an iframe on your normal website.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2308412 Photo


Registered User
12 posts


Can an iframe be placed within a cell of a table, Elk? I was thinking an iframe had to be a portion of a page, sort of like the way frames are done.

Yeah, Eric, you're right. It has to be done automatically. These data files come down from the weather station every 10 minutes, and the TXT file from NOAA changes every 4 hours. I can't be cutting and pasting 24/7.

What I need to do is have a script or some code on the index.html which when the user views the web page, the text from the KAOH.TXT appears within a cell of a table on the index.html.

I've never seen this done before, and maybe it can't be done. I would rather display it within the index.html than produce a link that they click to get the KAOH.TXT file.

User 2073552 Photo


Registered User
1,625 posts

And I frame can be placed anywhere. :D So, if you want it to update its self. Then I would recommend you place the IFRAME and link it to http://www.limaweather.com/KAOH.TXT inside your table or wherever you like. :D

<iframe src="http://www.limaweather.com/KAOH.TXT" width="10" height="10" scrolling="yes">
<p>Your browser does not support I-frames.</p>
</iframe>

Use this and just change the Width and Height to fit your needs.
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 187934 Photo


Senior Advisor
20,271 posts

I'm thinking again that he's thinking he wants it populate a table and keep all the data there to look at.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2308412 Photo


Registered User
12 posts

That's correct, Eric.

I can allow it to stretch vertically, but not horizontally. Normally there are two columns, and the one on the left has a image. The text usually takes up 80% of the cell on the right. If the NOAA should "grow" the text, I have a cushion before it starts to add space below the image.

Another thought is a Frame within a Frame, but that might get a little messy.
User 187934 Photo


Senior Advisor
20,271 posts

Do you know the name of the application that's writing the data to the webpage?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2073552 Photo


Registered User
1,625 posts

Is this the page you want to add the KAOH.txt too? http://www.limaweather.com/

If not could you provide a link to that page.

"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.