Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Thanked 0 Times in 0 Posts

    Exclamation Reading from file help please! very urgent!

    Hello! I'm very new to using Javascript, and need everyones help please.

    What I am trying to do is creat a HTML file that will use Javascript to read data in from a file....this I can do.
    However what I want to do is have a text file like the following:


    and read each of these values in seperatly into sperate arrays (as though this file was a simple database file, and each line would represnt a new row in the database).

    My question is....is this possible within javascript? if so, can someone give me the example code to do so with the above data please (pls include as much info as you can, as though your doing an "idiots guide" as i am an idiot and a newbie!! lol)

    Many thanks in advance

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Chamonix, France
    Thanked 3 Times in 3 Posts
    You can use FSO for IE and read in by line (the ReadLine method)

    Example included in the link:

    Hope this helps

    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts