954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Save the values of a form

I have 3 inputs in a form and i want to save the value of input3 as C:\My Documents\(input1)\(input2).
I've tried using an script, then use a script, but the script won't work.
Can anyone help me?

Please help,
Bladerbole

bladerbole
Newbie Poster
5 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

JavaScript is client-side code. Trying to save files locally violates the browser security model.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

Document.write prints to the current HTML page, not to the hard drive, I believe. There is no way to get JavaScript to write anything to a hard drive. You will need to use a server-side language such as PHP or ASP, to save to the server's drive.

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 

Of course, you CAN save your form values in cookies. Not all users have cookies, enabled, but that is exactly what cookies were designed to do.

Do you need help with JavaScript cookie code?

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

Did this work? Do you need more help? Pleave give us some feedback.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

Hi Guys, I'm a brand new user to Dani Web.. I was browsing the web looking for a script somewhat like this one. I hope someone will actually look back at this and reply. Here's my query:

I have a website where people can subscribe to get daily updates. However, I recently decided to do something to boost up my subscription numbers. I decided to give away a free gift to every subscriber. The only thing is that I'm not very good at xml or php, but I know it's doable. I just want to save the addresses and the names of every subscriber. I don't have my own host, therefore I can't install anything. I was just wondering if It's possible. I know I can redirect the form action to a php function where it can create or just edit an xml document and add the strings that were entered in the form, however my form action to subscribe people, therefore I can't change it?

Is it possible to use Javascript to save the values as cookies and then write those cookies in a txt file? I know I need Java to write anything on the hard drive.

Any ideas?

Thank you so much.

aliskov
Newbie Poster
7 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You