Link to home
Start Free TrialLog in
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.
Avatar of nmarun
nmarun
Flag of India image

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
Avatar of PNRT
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.
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
Avatar of 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.
Avatar of 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.
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
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
Avatar of 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.
Not without some additional work :(
Avatar of 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
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PNRT

ASKER

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