Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Script to load webpage from text file

  1. #11
    Join Date
    Apr 2005
    Posts
    1,333
    Rep Power
    0

    Default

    I want to pull the file from the webserver, not from the client.

    Thanks for the wikipedia article, I will research more on that.
    The fox was probably right - they could have been sour grapes.

  2. #12
    Join Date
    Jul 2006
    Posts
    239
    Rep Power
    0

    Default

    Quote Originally Posted by CyberCat View Post
    I want to pull the file from the webserver, not from the client.

    Thanks for the wikipedia article, I will research more on that.
    You can't use JavaScript to pull a file from the server. Unless you use VBScript. JavaScript runs on Client side only. VBScript runs server side. But if you go with VBScript why not use asp to create this page or some other server-side language like php, or java.

  3. #13
    Join Date
    Oct 2005
    Posts
    745
    Rep Power
    0

    Default

    I haven't read this through fully but you can have a look

    http://www.rodsdot.com/ee/readFileClientSide.asp

    Just read it and basically the ajax code allows you to request the file which is a csv. The response body can then be manipulated however you want, no vbscript.
    Last edited by recursion; Mar 1, 2007 at 02:32 PM.
    3.14159265358979323846264338327950288
    4197169399375105820974944592307816406
    28620899862803482534211706798 pi 101

  4. #14
    Join Date
    Dec 2002
    Posts
    500
    Rep Power
    0

    Default

    Quote Originally Posted by redbwoy View Post
    You can't use JavaScript to pull a file from the server. Unless you use VBScript.
    Wrong!! XMLHTTP object help ur self please

    Quote Originally Posted by redbwoy View Post
    JavaScript runs on Client side only.
    Wrong!! Js an in fact any .NET supported language can code ASP pages (which run server side)

    Quote Originally Posted by redbwoy View Post
    VBScript runs server side. But if you go with VBScript why not use asp to create this page or some other server-side language like php, or java.
    This is exactly what he does not want to do.
    Last edited by icymint3; Mar 2, 2007 at 05:13 PM.
    Cultured in Aggression and Koding like a Warrior!!
    “Common sense is instinct. Enough of it is genius.” - George Bernard Shaw.
    "The significant problems we face cannot be solved by the same level of thinking that created them." - Albert Einstein

  5. #15
    Join Date
    Sep 2004
    Posts
    281
    Rep Power
    0

    Default

    Quite observant! Using the http call to get the file.
    We get so caught up in making a function call to the server side, that we forget that the web server is doing a valuable function (Returning responses to request = pages) and miss the fact that we could simply ask for the file.

    The one question that comes to my mind is security. I guess the kewl thing is that AJAX does not allow cross site calling.
    Anything or Anyone that fails to grow will eventually die. {AI}
    -------------------------------------------------
    Tomorrow is the future!
    Today Is the Tomorrow you made Yesterday!{AI}

  6. #16
    Join Date
    Apr 2005
    Posts
    1,333
    Rep Power
    0

    Default

    I cannot use asp, because the site is going to be maintained by a non-tech person. The site has to be in english or spanish, based on the user's preference.

    The owner wants to be able to update the information on a regular basis by himself. He is also going to do the translation to spanish.

    I am thinking to use two sets of text files - one in english and one in spanish - so that the pages would load the info from either of them.
    The fox was probably right - they could have been sour grapes.

  7. #17
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Smile

    This is interesting.

    I wil experiment with some of this
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

Posting Permissions

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