Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

vb/javascript question

Options
  • 26-10-2001 2:22pm
    #1
    Registered Users Posts: 4,222 ✭✭✭


    I'm new to this whole vb and java scripting stuff and i need i little bit of help. :eek:

    Does anyone know how you would output information(ASCII format) entered to a table on a web page to a comma delimited text file in either VBscript or Javascript?

    pleezzzzze help!


Comments

  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    AFAIK File I/O is impossible in Javascript/VBScript. The script runs on the client-side so if you *could* write files you would be writing to their machine not the server.
    You'll need to use a server-side language like Perl or PHP for this.


  • Registered Users Posts: 4,222 ✭✭✭Scruff


    impossible fullstop? even on ASP pages where the client cant access it and everything goes on server side?


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    AFAIR, we were told that one of the great benefits of Javascript is that is it not allowed to read/write from the client computer, therefore is not usable for hacking. I think it is allowed read/write to the server computer though, for authentication purposes blah blah blah.....maybe someone an confirm? :)


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by seamus
    AFAIR, we were told that one of the great benefits of Javascript is that is it not allowed to read/write from the client computer, therefore is not usable for hacking. I think it is allowed read/write to the server computer though, for authentication purposes blah blah blah.....maybe someone an confirm? :)

    Confirmed. Tainting (don't even ask) will allow you do do more with JavaScript, but nothing with I/O. VBS can access the FSO on the client (hence all those fun VBS macro viruses for word and outlook), but this would be disabled on the vast majority of browsers.

    From your requirements, I'd hazard a guess that your best option would be to send your text based data from the server with a content-type of unknown. That way the broser will attempt to download the file rather than display it.

    Only problem is that it won't have a .txt extension unless you actually start doing silly things on the server like associating .txt with the scripting language you're using.

    An alternitive would be using client side ActiveX or just intructing the user to Save As...


Advertisement