I want to design a website which displays on loading two tables each with it's respective data from a csv file. Then every minute the website automatically refreshes.

This problem seems so simple! But yet the solution eludes me.

All of the files will be contained in 1 directory, not on a server but on a local machine. Such as sitting on the desktop. I understand if I use javascript I have to use ADO, and I'm still trying to work out how to use ASP. I am new with both languages. So far the only restriction is that I can't use PHP.

So the jist so far as I can think right now is: 1. read the file 2. place the file into an array by splitting at the commas 3. write the array into td's ????? 4. then print all this out into a div ????

I have googled my heart out and can't seem to find what I'm looking for. or even piece together what I'm looking for. Everything with javascript and ADO's leads me to dead ends, I can't find anything on ASP that is helpful.

Could someone please write up some sample code for a resource? Or have a better solution?

  • No web browser's JavaScript interpreter is going to let you read files on anyone's desktop, and ASP runs on your web server where it will similarly have no access to such files. Either way, StackOverflow is better suited for this sort of question. Nathan Duran over 6 years ago

1 answer

Kevin 20
0
points
This was chosen as the best answer

If there is someone on the machine, have them upload the files. Nathan is right, what you are describing is exactly what everyone fears from javascript, or java applets, or flash for that matter. This is a programming question for sure --> stackoverflow ;)

( If you have access to the desktop(s) , then I'd :

  • watch the directory using windows apis for change
  • when the directory content's change, post the data to your ASP page via http
  • i'd use an object, not an array ( Javascript objects are hash arrays anyway )

In short, given access to the desktop, reverse your logic flow and have the directory changes drive the table display.

)

Answered over 6 years ago by Kevin