Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

From what i understand, This usually has to be done server side. However i have read that it is possible to point to the csv file in a .js file. This would be more useful to me as i am not messing around with server side code and stuff for this project and will be all on my local machine. I saw an article with example code to do this somewere however i can't locate that article atm. Anyone know how to do this?

share|improve this question
 
Maybe you need: open files locally –  neworld Oct 19 '11 at 14:38
add comment

1 Answer

up vote 1 down vote accepted

To access any file from the system you have to use directX in IE or read up on how to use NPAPI for mozilla support.If you are willing to use HTML5, check out its filereader API here.

share|improve this answer
 
I am using HTML to use the Canvas tag to draw graphs. I need to parse the csv file to get the numbers to supply to the graph. –  user991735 Oct 19 '11 at 14:42
 
Ideally, server side is the best option for csv parsing if you ask me.Javascript-wise these are the only available methods i am afraid. –  Ashwin Ganesh K Oct 19 '11 at 14:44
 
Put the numbers in the page in a DIV or a string, or get them via AJAX parse them from there. –  Diodeus Oct 19 '11 at 14:45
 
How would i do it server side? I have just been doing the project locally in a directory. Not been using any server code. –  user991735 Oct 19 '11 at 16:35
 
If thats the case, read up on the aforementioned methods. –  Ashwin Ganesh K Oct 21 '11 at 5:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.