Results 1 to 2 of 2

Thread: Reading flat or txt file and displaying as part of an HTML document

  1. #1
    Join Date
    Sep 2008
    Location
    Midland, Texas
    Posts
    52
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Question Reading flat or txt file and displaying as part of an HTML document

    I am trying to write an HTML page for my office and I would like to include a script that reads either a CSV or TXT file and displays the information based on what is typed inside a text box. Can anyone help me with that or at least point me in the right direction? Thanks in advance for your help.

  2. #2
    Join Date
    Dec 2008
    Location
    Nigeria
    Posts
    95
    Thanks
    3
    Thanked 8 Times in 8 Posts

    Default

    Reading CSV or Txt File is best done with server scripting language like php...
    Anyway, i know one method with javascript when ur web browser is internet explorer:

    <HTML XMLNS:MSIE >

    <MSIEOWNLOAD ID="oDownload" STYLE="behavior:url(#default#download)" />

    <SCRIPT>
    function onDownloadDone(s) { alert (s); } //alert the file content
    </SCRIPT>

    <P>Click <A HREF="javascriptDownload.startDownload('sample.txt',
    onDownloadDone)">here</A> to download this page.

  3. The Following User Says Thank You to diltony For This Useful Post:

    xtiano77 (12-18-2008)

Bookmarks

Posting Permissions

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