Click to See Complete Forum and Search --> : how can you create a file using s script
crypto
10-24-2003, 04:55 AM
On my page I have a username box and a password box and a re-type password box when i type in the boxes then click on the submit button I want the script to cheack to see if the passwords are the same and then create a file with the Username then the Password .js as the file name ie:-
UsernamePassword.js
The capital letters must be in those places. In the file i want it to read:-
chk=true
userurl='site.html'
can someone help me please?
Gollum
10-24-2003, 05:27 AM
Hmm, interesting way of going about it.
Which 'script' are you talking about? where is this UsernamePassword.js going to be saved?
If you are thinking of doing it all locally, then you're out of luck, javascript can't create files on the user's machine - it's a security issue, if it could, no-one in their right mind would allow javascript to run in their browsers.
If it's on the server, then you'll need to use whatever means the server-side has on offer.
crypto
10-24-2003, 05:33 AM
The server will in the end be my computer that I'm getting soon but for now its on yahoo geocities for test perposis, it should work. The script will be saved in the root directory of the website which is the same directory as the page that 1 I want to create the .js file and 2 the page that will use it. Ok I hope that is enough infomation. Thank you for your time. Just a thought I could use a script to copy from one place the root directory then rename it to what i want it to be. But i don't know of any code or script to do that.