Can you read a file at a URL location using vbscript or javascript?

Discussion in 'Javascript' started by Doug, Dec 4, 2003.

  1. Doug

    Doug Guest

    I would appreciate a response on this.

    I have clients who will be placing text files information about in a
    network directory for example: http://www.protegen.com/clients/

    Is it possible to read these text files using either vbscript or
    javascript. What I am attempting to do is to read these files and then
    create charts for viewing by each client.

    A direct email to me at will help.


    Thanks for you response.

    Douglas Taylor
    Email:
    Protegen Business Intelligence
    www.protegen.com
     
    Doug, Dec 4, 2003
    #1
    1. Advertising

  2. Hi,

    Doug wrote:

    > I would appreciate a response on this.
    >
    > I have clients who will be placing text files information about in a
    > network directory for example: http://www.protegen.com/clients/
    >
    > Is it possible to read these text files using either vbscript or
    > javascript. What I am attempting to do is to read these files and then
    > create charts for viewing by each client.
    >
    > A direct email to me at will help.
    >
    >
    > Thanks for you response.
    >
    > Douglas Taylor
    > Email:
    > Protegen Business Intelligence
    > www.protegen.com


    One way it to script a Java applet:
    http://www.galasoft-LB.ch/myjava/WebLoadFile/Demo/Demo.html

    Laurent
    --
    Laurent Bugnion, GalaSoft
    Webdesign, Java, JavaScript: http://www.galasoft-LB.ch
    Private/Malaysia: http://mypage.bluewin.ch/lbugnion
    Support children in Calcutta: http://www.calcutta-espoir.ch
     
    Laurent Bugnion, GalaSoft, Dec 4, 2003
    #2
    1. Advertising

  3. Doug

    Brian Guest

    "Doug" <> wrote in message
    news:...
    > I would appreciate a response on this.
    >
    > I have clients who will be placing text files information about in a
    > network directory for example: http://www.protegen.com/clients/
    >
    > Is it possible to read these text files using either vbscript or
    > javascript. What I am attempting to do is to read these files and then
    > create charts for viewing by each client.
    >
    > A direct email to me at will help.
    >
    >
    > Thanks for you response.
    >
    > Douglas Taylor
    > Email:
    > Protegen Business Intelligence
    > www.protegen.com


    If your script is being hosted from the same domain as the files in
    question, you can load the file up in an IFRAME, and use Javascript to peek
    into the frame's DOM, getting the data.

    If your script is being hosted in a different domain, there are security
    restrictions put in Javascript that prevent frames from viewing each
    other... Unless you use HTA, where the restrictions are lifted, but this is
    not browser portable (Only works with IE 5+).

    Brian
     
    Brian, Dec 4, 2003
    #3
  4. Doug

    Doug Guest

    >
    > One way it to script a Java applet:
    > http://www.galasoft-LB.ch/myjava/WebLoadFile/Demo/Demo.html
    >
    > Laurent


    Laurent,

    Thanks for your response. Your demo is great and it allows me to read
    files that already exist. However, I don't think your Java applet will
    work for my particular situation.

    What I am attempting to do is create an automated way of processing my
    clients files. I would like to read the files from the client's
    network directory, and then trigger an application on my server to
    create charts.

    Any thoughts?

    Douglas Taylor
    Email:
    Protegen Business Intelligence
    www.protegen.com
     
    Doug, Dec 5, 2003
    #4
  5. Doug

    Brian Guest

    "Doug" <> wrote in message
    news:...
    > >
    > > One way it to script a Java applet:
    > > http://www.galasoft-LB.ch/myjava/WebLoadFile/Demo/Demo.html
    > >
    > > Laurent

    >
    > Laurent,
    >
    > Thanks for your response. Your demo is great and it allows me to read
    > files that already exist. However, I don't think your Java applet will
    > work for my particular situation.
    >
    > What I am attempting to do is create an automated way of processing my
    > clients files. I would like to read the files from the client's
    > network directory, and then trigger an application on my server to
    > create charts.
    >
    > Any thoughts?
    >
    > Douglas Taylor
    > Email:
    > Protegen Business Intelligence
    > www.protegen.com


    In that case, you can likely pipe the data back to the browser, using a mime
    type of your file type.
     
    Brian, Dec 5, 2003
    #5
  6. Hi,

    Doug wrote:

    >>One way it to script a Java applet:
    >>http://www.galasoft-LB.ch/myjava/WebLoadFile/Demo/Demo.html
    >>
    >>Laurent

    >
    >
    > Laurent,
    >
    > Thanks for your response. Your demo is great and it allows me to read
    > files that already exist. However, I don't think your Java applet will
    > work for my particular situation.
    >
    > What I am attempting to do is create an automated way of processing my
    > clients files. I would like to read the files from the client's
    > network directory, and then trigger an application on my server to
    > create charts.
    >
    > Any thoughts?
    >
    > Douglas Taylor


    Thanks for the compliment.

    If I were you, I would pass everything on the server, and have the
    server read your client's files (given that it can access them at all,
    which would be a precondition), and then process the charts.

    It would be more reliable in any case.

    HTH,

    Laurent
    --
    Laurent Bugnion, GalaSoft
    Webdesign, Java, JavaScript: http://www.galasoft-LB.ch
    Private/Malaysia: http://mypage.bluewin.ch/lbugnion
    Support children in Calcutta: http://www.calcutta-espoir.ch
     
    Laurent Bugnion, GalaSoft, Dec 5, 2003
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. duncan
    Replies:
    2
    Views:
    6,104
  2. csgraham74
    Replies:
    0
    Views:
    506
    csgraham74
    Jul 6, 2006
  3. Gery D. Dorazio

    How can the location roles be read from the web.config file?

    Gery D. Dorazio, Aug 10, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    160
    Gery D. Dorazio
    Aug 10, 2004
  4. Fred
    Replies:
    1
    Views:
    133
    Lasse Reichstein Nielsen
    Jul 18, 2003
  5. Replies:
    3
    Views:
    267
Loading...

Share This Page