Avatar of PNRT
PNRT
 asked on

Dispalying results on web page

Hi Experts.   I have a program that produces simple text files based on the status of companies in a database and drops them into a folder.   I'd like to display the contents of these text files very simply in a web page, so I can see the status while away from the office.    

The file is named after the company and just contains the time and the status - which is either OK or ERROR.  

When the webpage is opened, I would like to open each text file, show the name of the company, the time and the status.   This could be in individual lines down the webpage and would be great if in red for an error.     There are about 100 files to open and read.  

If possible I would prefer to keep this simple in HTML or maybe a java script,  rather than say ASP but I can maybe change the format away from text files if it make it easier?     Is this feasable?    Thanks in advance for the help.
HTMLJavaScript

Avatar of undefined
Last Comment
PNRT

8/22/2022 - Mon
nmarun

Sounds like an assignment. Please let us know how you have set up your project (either Java or ASP.NET or some other server side language).

Once you do that, paste the exact error message that you're getting and we can help you there.

Thanks,
Arun
PNRT

ASKER
You havent read the question...................

There are no error messages, its a question about how to display multiple text file content on a web page in a particular format.    

I always appreciate the help that I get on this site, but it does so help when the expert reads the question in the first place.
nmarun

You haven't read the first line in my comment.

Your problem seems like a school assignment. Like me, there are quite a few experts here who will not do your assignment for you.

You need to take the first step for us to be able to help you.

So, please set up your project and take a stab at trying to solve it yourself. If you have never done this before, chances are you will get stuck at some point. At that time, please post the details of what you've done and what is stopping you from making progress. That's when we will help you.

I was avoiding being so direct about stating this.

Happy coding,
Arun
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
PNRT

ASKER
LOL,  Thanks for brightening the day  - I'm 63 years old.....  oh for the days when I had to do school assigments!!!  

As I said, there are no error messages as you suggested, I'm looking for advice on the best and easiest way to view this data when I'm away from the office, on a web page   If that doesnt fit in with the way you like to assist others with questions, please ignore this one and perhaps another expert will take it up.
Chris Stanyon

Couple of options here:

Make sure you can view the files in your folder (like a directory/folder listing) and then you can just click on each file and see the content. No coding needed!

If you're just writing 'OK' or 'Error' to a text file based on database content, then why not just read the database directly?

Unlikely you can do much with just HTML - you are probably going to need some server-side scripting - ASP / PHP etc, so you might have better luck posting your question in those zones.
nmarun

Sorry sir, your age was not evident by your question or your user name.

As Chris mentioned above, you can read this information directly from the database itself.

What you can do is to create some kind of console application (either in Java or .net) which reads the database and spits out a html file for you at regular intervals (if need be) and you can just have a look at this file.

Thanks,
Arun
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Rainer Jeschor

Hi,
I would suggest to use a combination of ASP / ASP.NET (for reading the files server side) and Javascript/jQuery to format the output.
Perhaps it is also possible to do it just with Javascript but I would have to test this. Idea is that the folder contains no IIS default element and that IIS browsing is enabled. Then you should be able to process the directory listing client side.
What server OS do you have?
Thanks and HTH
Rainer
PNRT

ASKER
Thanks everyone for the suggestions, I knew I could read the text itself into the webpage  I was hoping that there might maybe an easy way to format it sensibly using just HTML,   looks like not though.  Thanks again.
Chris Stanyon

Not without some additional work :(
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
PNRT

ASKER
Hi Rainer, thanks for the reply.  I use IIS on Server 2008.  The files would be output to the same server and all the text could be included in one file if this would make it easier.   Perhaps Javascript to read the contents of the file and format it for the webpage?
ASKER CERTIFIED SOLUTION
Chris Stanyon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
PNRT

ASKER
looks exactly the sort of thing I was after.   Thanks for taking the time.