Ultra-newbie - Searching a text file with JavaScript

L

Leodiensian

Hello JavaScript Experts,

I have been a JavaScript programmer for two hours. I hope someone can
point me in the right direction.

I would like to write a simple script that would take a value from an
input text box on a web page (I think I can mangage that). Then I need
to search through a two-column 100 record data file and return the
corresponding value (the first column would be a key field). The data
file could just be a CSV file hosted on my normal ISP webspace (so
with a URL I could refer to in the script).

I could define my data in a two-dimensional array in the script
itself, but that would be a bit clumsy and it would be difficult to
update the data.

How can I open a data file, search through it, and return a value? I
want to avoid any server-side scripting as I think I need to have been
doing this for at least three hours to attempt that.

I have a basic understanding of common programming techniques, but not
in Javascript.

Many thanks for any pointers.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top