Click to See Complete Forum and Search --> : Write to file


harmzz
04-01-2003, 01:51 PM
how do u save check box answers to a file

thanks

Jona
04-01-2003, 01:52 PM
The FSO (File System Object) allows JavaScript to write to a file on the user's local computer but not on a Web server. This can only be done with a server-side language such as PHP, CGI/Perl, or ASP.

harmzz
04-01-2003, 01:56 PM
well is there anway i can quiz answers to a file on the harddrive

Jona
04-01-2003, 02:06 PM
Yes, but the user will have to be online to do it. And it will save to their computer only. You will not be able to retreive the results. It's better to use a server-side language to do this anyways.

harmzz
04-01-2003, 02:14 PM
ok let me explain proper

i got to do a quiz which will be presented of me hd

and i enter a student id and password and begin the quiz and when submitten i want it to save the answers to a file on the hd with the name obiulsy in reality it will be to server but it is a demo so i cant do it

Jona
04-01-2003, 02:19 PM
Unfortunately your grammar is more of a stubmling block than your explanation. If I caught all that, you want to have a file that is on the local computer to have a form on it. The user enters their name and password and then starts answering quiz questions on the form. When they are done, they click a button, JavaScript processes all of the information, and creates a file on the user's local computer with all of the correct answers, the answers they gave, and their username password. And then you want the page to redirect to the created page on their local hard drive to allow them to automatically view it?

1: That will take a lot of work;

2: it will only work in Internet Explorer, I believe;

3: I'm not so sure I want to do all that. :P

harmzz
04-01-2003, 02:28 PM
soz about that i was talking on msn and on the phone at the same time.

What bout notepad, is it possible to save the data in there.

Also

is it possible to have a file with usernames in there and the computer checks that its valid.

thanks

Jona
04-01-2003, 02:39 PM
It's possible to open Notepad, and it's possible to save a file as a .txt file, and it's possible to open that .txt file.

It's possible to check if the username and password is valid, but it's not secure: anyone can get in and view the source and get the usernames and passwords.